Skip to content

Commit

Permalink
tests: counter example for current state
Browse files Browse the repository at this point in the history
Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
  • Loading branch information
mihaibivol committed Apr 6, 2016
1 parent 5050ec2 commit 881ba3f
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/acceptance/test_merger_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def equal(self, obj1, obj2):
return obj1['full_name'][:5] == obj2['full_name'][:5]


@pytest.mark.xfail
@pytest.mark.parametrize('scenario', [
'author_typo_update_fix',
'author_typo_curator_fix',
Expand All @@ -57,7 +58,8 @@ def equal(self, obj1, obj2):
'author_reorder_and_double_curator_typo_fix',
'author_reorder_conflict',
'author_replace_and_single_curator_typo_fix',
'author_delete_and_double_curator_typo_fix'])
'author_delete_and_double_curator_typo_fix',
'author_curator_collab_addition'])
def test_author_typo_scenarios(update_fixture_loader, scenario):
comparators = {'authors': AuthorComparator()}
root, head, update, exp, desc = update_fixture_loader.load_test(scenario)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Curator added authors. Update adds another one. Expect the authors from update.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"authors": [
{
"affiliations": [
{
"value": "UC, Santa Barbara"
}
],
"curated_relation": false,
"full_name": "Cox, Brian"
},
{
"affiliations": [
{
"record": {
"$ref": "http://localhost:5000/api/institutions/903889"
},
"value": "UC, Berkeley"
},
{
"record": {
"$ref": "http://localhost:5000/api/institutions/903889"
},
"value": "LBL, Berkeley"
},
{
"record": {
"$ref": "http://localhost:5000/api/institutions/903889"
},
"value": "Santa Barbara, KITP"
}
],
"curated_relation": false,
"full_name": "O Brien, Dara",
"inspire_id": "INSPIRE-00113241"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"authors": [
{
"affiliations": [
{
"value": "UC, Santa Barbara"
}
],
"curated_relation": false,
"full_name": "Cox, Brian"
},
{
"affiliations": [
{
"record": {
"$ref": "http://localhost:5000/api/institutions/903889"
},
"value": "UC, Berkeley"
},
{
"record": {
"$ref": "http://localhost:5000/api/institutions/903889"
},
"value": "LBL, Berkeley"
},
{
"record": {
"$ref": "http://localhost:5000/api/institutions/903889"
},
"value": "Santa Barbara, KITP"
}
],
"curated_relation": false,
"full_name": "O Brien, Dara",
"inspire_id": "INSPIRE-00113241"
},
{
"full_name": "Coauthor, One"
},
{
"full_name": "Coauthor, Two"
},
{
"full_name": "Coauthor, Three"
},
{
"full_name": "Coauthor, Four"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"authors": [
{
"full_name": "Cox, Brian"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"authors": [
{
"full_name": "Cox, Brian"
},
{
"full_name": "O Brien, Dara",
"inspire_id": "INSPIRE-00113241"
}
]
}

0 comments on commit 881ba3f

Please sign in to comment.