Skip to content

Commit

Permalink
Added more tests for Resource().get_via_uri() (#949).
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanHayes committed Oct 12, 2015
1 parent b8a8660 commit ba24562
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/core/tests/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,21 @@ def test__get_via_uri__invalid_uri(self):
except NotFound:
pass

def test__get_via_uri__bad_uri_containing_resource_name(self):
resource = NoteResource(api_name='v1')
with self.assertRaises(NotFound):
resource.get_via_uri('/notes/api/v1/photos/1/')

def test__get_via_uri__nonexistant_resource(self):
resource = NoteResource(api_name='v1')
with self.assertRaises(NotFound):
resource.get_via_uri('/api/v1/foo/1/')

def test__get_via_uri__different_resource(self):
resource = NoteResource(api_name='v1')
with self.assertRaises(NotFound):
resource.get_via_uri('/api/v1/photos/1/')

def test__get_via_uri__list_uri(self):
resource = NoteResource(api_name='v1')
try:
Expand Down

0 comments on commit ba24562

Please sign in to comment.