Skip to content

Commit

Permalink
changed test
Browse files Browse the repository at this point in the history
  • Loading branch information
femalves committed Jul 28, 2023
1 parent f86dc91 commit a1f3a54
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions orcid_service/tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def request_empty_callback(request, uri, headers):
self.assertEqual(len(s.json['2015ApJ...810..149L']['source']),2)
for _, value in s.json.items():
putcode = value.get('putcode', None)
self.assert_type_string(putcode)
self.assertTrue(type(putcode), str)

httpretty.register_uri(
httpretty.GET, self.app.config['ORCID_API_ENDPOINT'] + '/0000-0001-8868-9743/record',
Expand Down Expand Up @@ -533,8 +533,5 @@ def request_callback(request, uri, headers):
self.assertStatus(r, 200)
self.assertTrue(r.json['name']['family-name']['value'] == 'Payne')

def assert_type_string(self, value):
assert isinstance(value, str), f"Value is not of type string. Found {type(value)} instead."

if __name__ == '__main__':
unittest.main()

0 comments on commit a1f3a54

Please sign in to comment.