예제 #1
0
 def test_wrong_status_with_wrong_headers(self, response_200):
     assert_that(
         status(300).headers({"Hello-Dude": "application/json"}),
         doesnt_match(response_200).with_description(
             "An HttpResponse object with status_code <300>, with headers: \"Hello-Dude: 'application/json'\"."
         ).with_mismatch_description(
             "Status code was: <200>. Does not contain header <Hello-Dude>."
         ))
예제 #2
0
 def test_status_ok_wrong_headers(self, response_200):
     assert_that(
         status(200).headers({"Hello-Dude": "3"}),
         doesnt_match(response_200).with_mismatch_description(
             "Does not contain header <Hello-Dude>."))
예제 #3
0
 def test_status_wrong(self, response_200):
     assert_that(
         status(300),
         doesnt_match(response_200).with_description(
             "An HttpResponse object with status_code <300>").
         with_mismatch_description("Status code was: <200>."))
예제 #4
0
 def test_status_ok_with_headers(self, response_200):
     assert_that(
         status(200).headers({"Content-Type": "application/json"}),
         matches(response_200).with_description(
             "An HttpResponse object with status_code <200>, with headers: \"Content-Type: 'application/json'\"."
         ))
예제 #5
0
 def test_status_ok(self, response_200):
     assert_that(
         status(200),
         matches(response_200).with_description(
             "An HttpResponse object with status_code <200>"))