def test_api_different_host_in_provider_url(self, github_mock): url = 'localhost' token = 'foo' prov = Provider(bundle=RequirementsBundle(), url=url) prov._api(token) github_mock.assert_called_once_with(token, base_url=url, timeout=50)
def test_ignore_ssl(self, github_mock): ignore_ssl = True provider = Provider(bundle=RequirementsBundle(), ignore_ssl=ignore_ssl) provider._api("foo") self.assertTrue(provider.ignore_ssl) github_mock.assert_called_once_with("foo", timeout=50, verify=(not ignore_ssl))
def test_api(self, github_mock): prov = Provider(bundle=RequirementsBundle()) prov._api("foo") github_mock.assert_called_once_with("foo", timeout=50)
def setUp(self): self.provider = Provider(bundle=Mock()) self.provider._api = Mock() self.repo = Mock()
def test_ignore_ssl_should_be_default_false(self): provider = Provider(bundle=Mock()) self.assertFalse(provider.ignore_ssl)