示例#1
0
 def test_https(self):
     result = verify.path_exists('https://example.com')
     self.assertIs(result, True)
     self.assertFalse(self.mock_isfile.called)
示例#2
0
 def test_file_does_not_exist(self):
     self.mock_isfile.return_value = False
     result = verify.path_exists('./pacts/consumer-provider.json')
     self.assertIs(result, False)
     self.mock_isfile.assert_called_once_with(
         './pacts/consumer-provider.json')
示例#3
0
 def test_http(self):
     result = verify.path_exists('http://localhost')
     self.assertIs(result, True)
     self.assertFalse(self.mock_isfile.called)