Example #1
0
    def test_full_github_requirements_test(self):
        url = build_github_url("sesh/piprot", path="requirements.txt")

        expected = "https://raw.githubusercontent.com/sesh/piprot/master/requirements.txt"  # noqa
        self.assertEqual(url, expected)

        response = requests.get(url)
        req_file = StringIO(response.text)
        requirements = parse_req_file(req_file)
        self.assertTrue("requests" in [req for req, version in requirements])
Example #2
0
    def test_full_github_requirements_test(self):
        url = build_github_url('sesh/piprot', path='requirements.txt')

        expected = 'https://raw.githubusercontent.com/sesh/piprot/master/requirements.txt'
        self.assertEqual(url, expected)

        response = requests.get(url)
        req_file = StringIO(response.text)
        requirements = parse_req_file(req_file)
        self.assertTrue('requests' in [req for req, version in requirements])
Example #3
0
 def test_repo_url_with_access_token(self):
     url = build_github_url('sesh/piprot', token='SUCH-SECRET-MANY-T0KEN')
     expected = 'https://raw.githubusercontent.com/sesh/piprot/master/requirements.txt?token=SUCH-SECRET-MANY-T0KEN'
     self.assertEqual(url, expected)
Example #4
0
 def test_repo_url_with_path(self):
     url = build_github_url('sesh/piprot', path='requirements/_base.txt')
     expected = 'https://raw.githubusercontent.com/sesh/piprot/master/requirements/_base.txt'
     self.assertEqual(url, expected)
Example #5
0
 def test_repo_url_with_branch(self):
     url = build_github_url('sesh/piprot', 'develop')
     expected = 'https://raw.githubusercontent.com/sesh/piprot/develop/requirements.txt'
     self.assertEqual(url, expected)
Example #6
0
 def test_repo_url(self):
     url1 = build_github_url('sesh/piprot')
     url2 = build_github_url('sesh/piprot', 'master')
     self.assertEqual(url1, url2)
Example #7
0
 def test_repo_url_with_path(self):
     url = build_github_url("sesh/piprot", path="requirements/_base.txt")
     expected = "https://raw.githubusercontent.com/sesh/piprot/master/requirements/_base.txt"  # noqa
     self.assertEqual(url, expected)
Example #8
0
 def test_repo_url_with_access_token(self):
     url = build_github_url("sesh/piprot", token="SUCH-SECRET-MANY-T0KEN")
     expected = (
         "https://raw.githubusercontent.com/sesh/piprot/master/requirements.txt?token=SUCH-SECRET-MANY-T0KEN"
     )  # noqa
     self.assertEqual(url, expected)
Example #9
0
 def test_repo_url_with_branch(self):
     url = build_github_url("sesh/piprot", "develop")
     expected = "https://raw.githubusercontent.com/sesh/piprot/develop/requirements.txt"  # noqa
     self.assertEqual(url, expected)
Example #10
0
 def test_repo_url(self):
     url1 = build_github_url("sesh/piprot")
     url2 = build_github_url("sesh/piprot", "master")
     self.assertEqual(url1, url2)
Example #11
0
 def test_absolute_repo_url(self):
     url1 = build_github_url('sesh/piprot')
     url2 = build_github_url('https://github.com/sesh/piprot')
     self.assertEqual(url1, url2)
Example #12
0
 def test_absolute_repo_url(self):
     url1 = build_github_url('sesh/piprot')
     url2 = build_github_url('https://github.com/sesh/piprot')
     self.assertEqual(url1, url2)
Example #13
0
 def test_repo_url(self):
     url1 = build_github_url('sesh/piprot')
     url2 = build_github_url('sesh/piprot', 'master')
     self.assertEqual(url1, url2)