예제 #1
0
 def test_equal_bodies(self):
     actual = Response(
             headers={}, 
             status_code=200, 
             data={'key' : 'value'})
     assertions.assert_response_matches({'body' : {'key' : 'value'},
                                         'status_code' : 200,
                                         'headers' : {}}, actual)
예제 #2
0
 def test_omit_status_and_headers(self):
     actual = Response(headers={}, status_code=200, data={})
     assertions.assert_response_matches({'body' : {}}, actual)
예제 #3
0
 def test_empty_body(self):
     actual = Response(headers={}, status_code=200, data={})
     assertions.assert_response_matches({'body' : {},
                                         'status_code' : 200,
                                         'headers' : {}}, actual)