Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit Vermeulen committed Jan 31, 2024
1 parent d1bef60 commit fbcecda
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions home/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from unittest import mock
from io import StringIO
from unittest import mock

from django.core.exceptions import ValidationError
from django.core.management import call_command
Expand Down Expand Up @@ -323,10 +323,15 @@ def test_create_whatsapp_template_submit_return_error(

self.assertRaises(ValidationError)
self.assertEqual(e.exception.message, "Failed to submit template")

def test_for_missing_migrations(self):
output = StringIO()
call_command("makemigrations", no_input=True, dry_run=True, stdout=output)
self.assertEqual(output.getvalue().strip(), "No changes detected", "There are missing migrations:\n %s" % output.getvalue())
self.assertEqual(
output.getvalue().strip(),
"No changes detected",
"There are missing migrations:\n %s" % output.getvalue(),
)


class WhatsappBlockTests(TestCase):
Expand Down

0 comments on commit fbcecda

Please sign in to comment.