Skip to content

Commit

Permalink
Handle accepted content-types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Feb 26, 2016
1 parent b0b2e74 commit d9ab9db
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kinto/tests/test_views_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,18 @@ def test_records_should_reject_unaccepted_request_content_type(self):
headers=headers,
status=415)

def test_records_should_reject_unaccepted_client_accept(self):
headers = self.headers.copy()
headers['Accept'] = 'text/plain'
self.app.get(self.record_url,
MINIMALIST_RECORD,
headers=headers,
status=406)

def test_records_should_accept_client_accept(self):
headers = self.headers.copy()
headers['Accept'] = '*/*'
self.app.get(self.record_url,
MINIMALIST_RECORD,
headers=headers,
status=200)

0 comments on commit d9ab9db

Please sign in to comment.