Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed May 15, 2024
1 parent fbf3aa1 commit 13dd449
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions georiviere/river/tests/test_managers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.test import TestCase

from georiviere.river.models import Stream
from georiviere.river.tests.factories import StreamFactory


class RiverManagerTestCase(TestCase):
@classmethod
def setUpTestData(cls):
StreamFactory.create_batch(5)

def test_truncate(self):
self.assertEqual(Stream.objects.count(), 5)
Stream.objects.truncate()
self.assertEqual(Stream.objects.count(), 0)

0 comments on commit 13dd449

Please sign in to comment.