Skip to content

Commit

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


Expand All @@ -17,6 +18,7 @@ def setUp(self):
self.aoi = AoiFactory(dataset=self.dataset)
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)

def test_dataset_creation(self):
self.assertEqual(self.dataset.name, "Test Dataset")
Expand All @@ -34,3 +36,11 @@ def test_model_creation(self):
self.assertEqual(self.model.dataset, self.dataset)
self.assertEqual(self.model.created_by, self.user)
self.assertEqual(self.model.status, -1)

def test_training_creation(self):
self.assertEqual(self.training.model, self.model)
self.assertEqual(self.training.status, "SUBMITTED")
self.assertEqual(self.training.zoom_level, [20, 21])
self.assertEqual(self.training.created_by, self.user)
self.assertEqual(self.training.epochs, 3)
self.assertEqual(self.training.batch_size, 24)

0 comments on commit af30aca

Please sign in to comment.