forked from qiita-spots/qiita
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add social handles (qiita-spots#3412)
* user profile can now also store social handles from google scholar, ORCID and ResearchGate * set DEFAULT NULL to new qiita.qiita_user columns * extending existing test * extending tests * add tests for validator functions for WTform StringFields * operate on str instead of field.data
- Loading branch information
Showing
10 changed files
with
286 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ INSERT INTO qiita.user_level VALUES (7, 'wet-lab admin', 'Can access the private | |
-- Data for Name: qiita_user; Type: TABLE DATA; Schema: qiita; Owner: antoniog | ||
-- | ||
|
||
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 4, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'Dude', 'Nowhere University', '123 fake st, Apt 0, Faketown, CO 80302', '111-222-3344', NULL, NULL, NULL, false); | ||
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 4, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'Dude', 'Nowhere University', '123 fake st, Apt 0, Faketown, CO 80302', '111-222-3344', NULL, NULL, NULL, false, '0000-0002-0975-9019', 'Rob-Knight', '_e3QL94AAAAJ'); | ||
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 4, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'Shared', 'Nowhere University', '123 fake st, Apt 0, Faketown, CO 80302', '111-222-3344', NULL, NULL, NULL, false); | ||
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 1, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'Admin', 'Owner University', '312 noname st, Apt K, Nonexistantown, CO 80302', '222-444-6789', NULL, NULL, NULL, false); | ||
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 4, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'Demo', 'Qiita Dev', '1345 Colorado Avenue', '303-492-1984', NULL, NULL, NULL, false); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,10 @@ def setUp(self): | |
'pass_reset_code': None, | ||
'pass_reset_timestamp': None, | ||
'user_verify_code': None, | ||
'receive_processing_job_emails': True | ||
'receive_processing_job_emails': True, | ||
'social_orcid': None, | ||
'social_researchgate': None, | ||
'social_googlescholar': None | ||
} | ||
|
||
def tearDown(self): | ||
|
@@ -125,7 +128,10 @@ def test_create_user(self): | |
'address': None, | ||
'user_level_id': 5, | ||
'receive_processing_job_emails': False, | ||
'email': '[email protected]'} | ||
'email': '[email protected]', | ||
'social_orcid': None, | ||
'social_researchgate': None, | ||
'social_googlescholar': None} | ||
self._check_correct_info(obs, exp) | ||
|
||
# Make sure new system messages are linked to user | ||
|
@@ -162,7 +168,10 @@ def test_create_user_info(self): | |
'user_verify_code': '', | ||
'user_level_id': 5, | ||
'receive_processing_job_emails': True, | ||
'email': '[email protected]'} | ||
'email': '[email protected]', | ||
'social_orcid': None, | ||
'social_researchgate': None, | ||
'social_googlescholar': None} | ||
self._check_correct_info(obs, exp) | ||
|
||
def test_create_user_column_not_allowed(self): | ||
|
@@ -229,7 +238,10 @@ def test_get_info(self): | |
'pass_reset_timestamp': None, | ||
'user_verify_code': None, | ||
'receive_processing_job_emails': False, | ||
'phone': '222-444-6789' | ||
'phone': '222-444-6789', | ||
'social_orcid': None, | ||
'social_researchgate': None, | ||
'social_googlescholar': None | ||
} | ||
self.assertEqual(self.user.info, expinfo) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.