~lutostag/ubuntu/trusty/maas/1.5.4+keystone

« back to all changes in this revision

Viewing changes to src/metadataserver/tests/test_migrations.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-03-04 11:49:44 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20130304114944-azcvu9anlf8mizpa
Tags: upstream-1.3+bzr1452+dfsg
ImportĀ upstreamĀ versionĀ 1.3+bzr1452+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2012 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
"""Sanity checks for database migrations.
 
5
 
 
6
These tests need to be included in each of the MAAS applications that has
 
7
South-managed database migrations.
 
8
"""
 
9
 
 
10
from __future__ import (
 
11
    absolute_import,
 
12
    print_function,
 
13
    unicode_literals,
 
14
    )
 
15
 
 
16
__metaclass__ = type
 
17
__all__ = []
 
18
 
 
19
from maasserver.testing.db_migrations import detect_sequence_clashes
 
20
from maastesting.testcase import TestCase
 
21
 
 
22
 
 
23
class TestMigrations(TestCase):
 
24
 
 
25
    def test_migrations_have_unique_numbers(self):
 
26
        self.assertEqual([], detect_sequence_clashes('metadataserver'))