예제 #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])
예제 #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])
예제 #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)
예제 #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)
예제 #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)
예제 #6
0
 def test_repo_url(self):
     url1 = build_github_url('sesh/piprot')
     url2 = build_github_url('sesh/piprot', 'master')
     self.assertEqual(url1, url2)
예제 #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)
예제 #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)
예제 #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)
예제 #10
0
 def test_repo_url(self):
     url1 = build_github_url("sesh/piprot")
     url2 = build_github_url("sesh/piprot", "master")
     self.assertEqual(url1, url2)
예제 #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)
예제 #12
0
파일: test_github.py 프로젝트: sesh/piprot
 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)
예제 #13
0
파일: test_github.py 프로젝트: sesh/piprot
 def test_repo_url(self):
     url1 = build_github_url('sesh/piprot')
     url2 = build_github_url('sesh/piprot', 'master')
     self.assertEqual(url1, url2)