Add test for experiment status creation
@@ -1272,6 +1272,18 @@ class TestExperimentStatusListViewV1(BaseViewTest):
assert last_object.experiment == self.experiment
assert last_object.status == data['status']
+ # Create with message and traceback
+ data = {'status': ExperimentLifeCycle.FAILED,
+ 'message': 'message1',
+ 'traceback': 'traceback1'}
+ resp = self.auth_client.post(self.url, data)
+ assert resp.status_code == status.HTTP_201_CREATED
+ assert self.model_class.objects.count() == self.num_objects + 2
+ last_object = self.model_class.objects.last()
+ assert last_object.experiment == self.experiment
+ assert last_object.message == data['message']
+ assert last_object.message == data['traceback']
+
@pytest.mark.experiments_mark
class TestExperimentMetricListViewV1(BaseViewTest):
