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"])
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'])
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)
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)