Prepare for 1.3.3 release.
[mailman-postorious.git] / src / postorius / tests / test_migration.py
blobe9590ab77db67aac88242c16ba261a102b6cf627
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2018-2019 by the Free Software Foundation, Inc.
4 # This file is part of Postorius.
6 # Postorius is free software: you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation, either version 3 of the License, or (at your option)
9 # any later version.
11 # Postorius is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 # more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Postorius. If not, see <http://www.gnu.org/licenses/>.
19 from io import StringIO
21 from django.core.management import call_command
22 from django.test import TestCase
25 class TestMigrationPending(TestCase):
27 def test_pending_migration(self):
28 # Test that there aren't any pending migrations to be added.
29 output = StringIO()
30 # We will call the makemigrations command and check the output.
31 call_command(
32 'makemigrations', interactive=False, dry_run=True, stdout=output)
33 self.assertEqual(output.getvalue(), 'No changes detected\n')