Beispiel #1
0
 def test_has_all_headers(self):
     headers = {
         'Stubo-Request-Headers' : '''{
            "Content-Type" : "text/xml",
            "X-Custom-Header" : "1234"
         }'''
     }
     assert_that(self.get_stubo_request(**headers), 
                 has_headers('{"Content-Type" : "text/xml", "X-Custom-Header" : "1234"}'))  
Beispiel #2
0
 def test_not_has_header(self):
     headers = {
         'Stubo-Request-Headers' : '''{
            "Content-Type" : "application/json",
            "X-Custom-Header" : "1234"
         }'''
     }
     assert_that(self.get_stubo_request(**headers), 
                 is_not(has_headers('{"Content-Type" : "text/xml"}')))     
Beispiel #3
0
 def test_undefined(self):
     headers = {}
     assert_that(self.get_stubo_request(**headers), 
                 is_not(has_headers('{"Content-Type" : "text/xml"}')))           
                         
Beispiel #4
0
 def test_has_empty_headers(self):
     headers = {
         'Stubo-Request-Headers' : '{}'
     }
     assert_that(self.get_stubo_request(**headers), 
                 is_not(has_headers('{"Content-Type" : "text/xml"}')))