Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Improving tests for synchronization, by checking exact numbers of added/removed datasets. #5

Open
wants to merge 1 commit into
base: 0.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions autotest_coverages/tests/synchronization.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def setUp(self):
)

def test_synchronize_add(self):
synchronize(self.collection)
result = synchronize(self.collection)
self.assertEqual(result, (3, 0))
coverages = models.Coverage.objects.filter(
identifier__in=[
"mosaic_MER_FRS_1PNPDE20060816_090929_000001972050_00222_23322_0058_RGB_reduced",
Expand Down Expand Up @@ -119,7 +120,9 @@ def test_synchronize_remove(self):
)
self.collection.insert(dataset)

synchronize(self.collection)
result = synchronize(self.collection)
self.assertEqual(result, (0, 1))

with self.assertRaises(models.Coverage.DoesNotExist):
models.Coverage.objects.get(
identifier="rectified-1"
Expand Down