Skip to content

Commit

Permalink
added feeback creation test
Browse files Browse the repository at this point in the history
  • Loading branch information
nifedara committed Apr 2, 2024
1 parent 450db06 commit 4b7c728
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backend/tests/test_core_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
LabelFactory,
ModelFactory,
TrainingFactory,
FeedbackFactory,
)


Expand All @@ -19,6 +20,7 @@ def setUp(self):
self.label = LabelFactory(aoi=self.aoi)
self.model = ModelFactory(dataset=self.dataset, created_by=self.user)
self.training = TrainingFactory(model=self.model, created_by=self.user)
self.feedback = FeedbackFactory(training=self.training, user=self.user)

def test_dataset_creation(self):
self.assertEqual(self.dataset.name, "Test Dataset")
Expand All @@ -44,3 +46,10 @@ def test_training_creation(self):
self.assertEqual(self.training.created_by, self.user)
self.assertEqual(self.training.epochs, 3)
self.assertEqual(self.training.batch_size, 24)

def test_feedback_creation(self):
self.assertEqual(self.feedback.training, self.training)
self.assertEqual(self.feedback.zoom_level, 19)
self.assertEqual(self.feedback.feedback_type, "TP")
self.assertEqual(self.feedback.user, self.user)
self.assertEqual(self.feedback.source_imagery, "https://test_data/hotosm/fAIr/")

0 comments on commit 4b7c728

Please sign in to comment.