Exemple #1
0
 def test_bad_return_status_throws(self):
     session = MockSession(503)
     with self.assertRaises(Exception):
         gethash.get_package_server_url(session, "dummy_server", ["a==1", "b==2"])
Exemple #2
0
 def test_bad_return_status_throws(self):
     session = MockSession(503)
     with self.assertRaises(Exception):
         gethash.get_package_server_url(session, 'dummy_server',
                                        ['a==1', 'b==2'])
Exemple #3
0
 def test_get_server_url_returns_url(self):
     session = MockSession()
     url = gethash.get_package_server_url(session, "dummy_server", ["a==1", "b==2"])
     self.assertEqual("the_url", url)
Exemple #4
0
 def test_get_server_url_returns_url(self):
     session = MockSession()
     url = gethash.get_package_server_url(session, 'dummy_server',
                                          ['a==1', 'b==2'])
     self.assertEqual('the_url', url)