コード例 #1
0
ファイル: test_github.py プロジェクト: shlomiLan/pyup
    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)
コード例 #2
0
    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))
コード例 #3
0
 def test_api(self, github_mock):
     prov = Provider(bundle=RequirementsBundle())
     prov._api("foo")
     github_mock.assert_called_once_with("foo", timeout=50)
コード例 #4
0
 def setUp(self):
     self.provider = Provider(bundle=Mock())
     self.provider._api = Mock()
     self.repo = Mock()
コード例 #5
0
 def test_ignore_ssl_should_be_default_false(self):
     provider = Provider(bundle=Mock())
     self.assertFalse(provider.ignore_ssl)