Пример #1
0
 def test_namespace_match(self):
     assert_that(self.get_stubo_request(body='<user:find xmlns:user="******"><me>hello</me></user:find>'),
                 body_xpath('/user:find/me', {'user' : "http://www.my.com/userschema"}))
     assert_that(self.get_stubo_request(body='<user:find xmlns:user="******"><me>hello</me></user:find>'),
                 body_xpath('//user:find/me', {'user' : "http://www.my.com/userschema"}))    
Пример #2
0
 def test_failure(self):
     assert_that(self.get_stubo_request(body='<findx><me>hello</me></findx>'),
                 is_not(body_xpath('/find/me')))
     assert_that(self.get_stubo_request(body='<findx><me>hello</me></findx>'),
                 is_not(body_xpath('//find/me')))       
Пример #3
0
 def test_match(self):
     assert_that(self.get_stubo_request(body='<find><me>hello</me></find>'),
                 body_xpath('/find/me'))
     assert_that(self.get_stubo_request(body='<find><me>hello</me></find>'),
                 body_xpath('//find/me'))