-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from kelockhart/blank-author
Fix to not import blank author in myADS
- Loading branch information
Showing
2 changed files
with
8 additions
and
5 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 |
---|---|---|
|
@@ -40,7 +40,7 @@ def test_exc(): | |
@httpretty.activate | ||
def test_upsert_myads(self): | ||
user_id = 5 | ||
classic_setup = {"ast_aut": "Lockwood, G.\r\nKurtz, M.", | ||
classic_setup = {"ast_aut": "Accomazzi, A.\r\nKurtz, M.", | ||
"ast_t1": "photosphere\r\nchromosphere\r\n", | ||
"ast_t2": "\"climate change\"\r\n\"global warming\"\r\n\"solar variation\"", | ||
"email": "[email protected]", | ||
|
@@ -50,7 +50,7 @@ def test_upsert_myads(self): | |
], | ||
"id": 2060288, | ||
"lastname": "", | ||
"phy_aut": "Lockwood, G.", | ||
"phy_aut": "Lockwood, G.\r\n", | ||
"phy_t1": "photosphere\r\nchromosphere\r\n", | ||
"phy_t2": "\"climate change\"\r\n\"global warming\"\r\n\"solar variation\"", | ||
"pre_aut": "Lockwood, G.", | ||
|
@@ -64,6 +64,9 @@ def test_upsert_myads(self): | |
with self.app.session_scope() as session: | ||
q = session.query(MyADS).filter_by(user_id=user_id).all() | ||
self.assertEquals(len(q), 4) | ||
# make sure the blank author is removed | ||
self.assertEquals(q[1].data, 'author:"Lockwood, G." OR author:"Accomazzi, A." OR author:"Kurtz, M."') | ||
|
||
self.assertEquals(len(existing_setups), 0) | ||
self.assertEquals(len(new_setups), 4) | ||
self.assertEquals(new_setups[2], {'id': 3, | ||
|
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