def test_server_response(self): # will require automatic test server to shutdown, for now, just to it by hand before running this test if not is_test_server_running(): with self.assertRaises(ApiException): SquadApi.get('/api/groups') else: self.assertTrue(SquadApi.get('/api/groups') is not None)
def test_unauthorized_access(self): with self.assertRaises(ApiException): SquadApi.get('/my_group/my_private_project') SquadApi.configure(url='http://localhost:%s' % settings.DEFAULT_SQUAD_PORT, token='193cd8bb41ab9217714515954e8724f651ef8601') response = SquadApi.get('/my_group/my_private_project') self.assertTrue(response.ok) # reset config self.setUp()
def test_out_of_domain_object_url(self): with self.assertRaises(ApiException): SquadApi.get('http://some.other.url')