def test_clients_for_experiment_GET(self): self.req.swagger_data = {'appid': 1, 'expid': 1} httpExperiments = Experiments(self.req) response = httpExperiments.clients_for_experiment_GET() clients = [{ 'id': 1, 'clientname': 'First client' }, { 'id': 2, 'clientname': 'Second client' }] assert response == clients
def test_clients_for_experiment_GET_nonexistent_experiment(self): self.req.swagger_data = {'appid': 1, 'expid': 2} httpExperiments = Experiments(self.req) response = httpExperiments.clients_for_experiment_GET() assert response.status_code == 400 assert response.json == None