def test_create_experiment_group(self): project_uuid = uuid.uuid4().hex object = ExperimentGroupConfig(content=faker.word(), project=project_uuid) httpretty.register_uri(httpretty.POST, ProjectClient._build_url( self.client.base_url, ProjectClient.ENDPOINT, project_uuid, 'experiment_groups'), body=json.dumps(object.to_dict()), content_type='application/json', status=200) result = self.client.create_experiment_group(project_uuid, object) assert result.to_dict() == object.to_dict()
def test_update_experiment_group(self): object = ExperimentGroupConfig(faker.word(), uuid=uuid.uuid4().hex, project=uuid.uuid4().hex) experiment_group_uuid = object.uuid httpretty.register_uri(httpretty.PATCH, ExperimentGroupClient._build_url( self.client.base_url, ExperimentGroupClient.ENDPOINT, experiment_group_uuid), body=json.dumps(object.to_dict()), content_type='application/json', status=200) result = self.client.update_experiment_group(experiment_group_uuid, {'content': 'new'}) assert result.to_dict() == object.to_dict()