def test_experimentgroup_GET_nonexistent_experiment(self): self.req.swagger_data = {'appid': 1, 'expid': 2} httpExperiments = Experiments(self.req) response = httpExperiments.experimentgroup_GET() expected = 400 assert response.status_code == expected
def test_experimentgroup_GET(self): self.req.swagger_data = {'appid': 1, 'expid': 1} httpExperiments = Experiments(self.req) response = httpExperiments.experimentgroup_GET() expected = list(map(lambda _: _.as_dict(), \ ExperimentGroup.query().join(Experiment).join(Application)\ .filter(Application.id == 1, Experiment.id == 1).all())) assert response == expected