Skip to content

Commit

Permalink
Add test for independent build_response code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpacer committed Jun 11, 2019
1 parent 800886c commit 803e3c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bookstore/tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,11 @@ def test_get(self):
setattr(get_handler, '_transforms', [])
get_handler.get()

def test_build_response(self):
empty_handler = self.get_handler('/api/bookstore/')
expected = {
'bookstore': True,
'validation': {'archive_valid': True, 'bookstore_valid': False, 'publish_valid': True},
'version': '2.3.0.dev',
}
assert empty_handler.build_response_dict() == expected

0 comments on commit 803e3c2

Please sign in to comment.