Skip to content

Commit

Permalink
HTTP Method uniformity
Browse files Browse the repository at this point in the history
There was some places where the http method 'get' was written in
lowercase. this was changed to upper case to match the rest of the
codebase, and broke some tests. This fixes those tests also.
  • Loading branch information
NyanHelsing committed Jun 5, 2018
1 parent 10ee255 commit f2edb4d
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions tests/providers/box/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ async def test_validate_v1_path_file(self, provider, root_provider_fixtures):
good_url = provider.build_url('files', file_id, fields='id,name,path_collection')
bad_url = provider.build_url('folders', file_id, fields='id,name,path_collection')

aiohttpretty.register_json_uri('get', good_url,
body=root_provider_fixtures['file_metadata']['entries'][0],
status=200)
aiohttpretty.register_uri('get', bad_url, status=404)
aiohttpretty.register_json_uri(
'GET',
good_url,
body=root_provider_fixtures['file_metadata']['entries'][0],
status=200
)
aiohttpretty.register_uri('GET', bad_url, status=404)

try:
wb_path_v1 = await provider.validate_v1_path('/' + file_id)
Expand All @@ -105,10 +108,14 @@ async def test_validate_v1_path_folder(self, provider, root_provider_fixtures):
good_url = provider.build_url('folders', folder_id, fields='id,name,path_collection')
bad_url = provider.build_url('files', folder_id, fields='id,name,path_collection')

aiohttpretty.register_json_uri('get', good_url,
body=root_provider_fixtures['folder_object_metadata'],
status=200)
aiohttpretty.register_uri('get', bad_url, status=404)
aiohttpretty.register_json_uri(
'GET',
good_url,
body=root_provider_fixtures['folder_object_metadata'],
status=200
)
aiohttpretty.register_uri('GET', bad_url, status=404)

try:
wb_path_v1 = await provider.validate_v1_path('/' + folder_id + '/')
except Exception as exc:
Expand Down

0 comments on commit f2edb4d

Please sign in to comment.