# Path: test_projects/django14/suthern/migration_helpers.py
# class SouthMigrationTestCase(TransactionTestCase):
#     """A Test case for testing South migrations."""
# 
#     # Source:
#     # https://micknelson.wordpress.com/2013/03/01/testing-django-migrations/
# 
#     # These must be defined by subclasses.
#     start_migration = None
#     dest_migration = None
#     django_application = None
# 
#     def setUp(self):
#         super(SouthMigrationTestCase, self).setUp()
#         migrations = Migrations(self.django_application)
#         self.start_orm = migrations[self.start_migration].orm()
#         self.dest_orm = migrations[self.dest_migration].orm()
# 
#         # Ensure the migration history is up-to-date with a fake migration.
#         # The other option would be to use the south setting for these tests
#         # so that the migrations are used to setup the test db.
#         call_command('migrate', self.django_application, fake=True,
#                      verbosity=0)
#         # Then migrate back to the start migration.
#         call_command('migrate', self.django_application, self.start_migration,
#                      verbosity=0)
# 
#     def tearDown(self):
#         # Leave the db in the final state so that the test runner doesn't
#         # error when truncating the database.
#         call_command('migrate', self.django_application, verbosity=0)
# 
#     def migrate_to_dest(self):
#         call_command('migrate', self.django_application, self.dest_migration,
#                      verbosity=0)
# 
# Path: test_projects/django14/suthern/models.py
# class ChickenBalls(models.Model):
#     """ChickenBalls is used for South migration testing"""
# 
#     SUICIDE = 's'
#     HOT = 'h'
#     HOME_STYLE = 'H'
#     CAJUN = 'c'
#     JERK = 'j'
#     GATOR = 'g'
#     FLAVOUR_CHOICES = (
#         (_('Hot & Spicy'), (
#             (SUICIDE, _('Suicide hot')),
#             (HOT, _('Hot hot sauce')),
#             (CAJUN, _('Cajun sauce')),
#             (JERK, _('Jerk sauce')))),
#         (_('Traditional'), (
#             (HOME_STYLE, _('Homestyle')),
#             (GATOR, _('Gator flavour')))),
#     )
#     flavour = SelectMultipleField(
#         blank=True,
#         include_blank=False,
#         max_length=5,
#         max_choices=2,
#         choices=FLAVOUR_CHOICES
#     )
#     RANCH = 'r'
#     HONEY_MUSTARD = 'h'
#     BBQ = 'b'
#     DIP_CHOICES = (
#         (RANCH, _('Ranch')),
#         (HONEY_MUSTARD, _('Honey mustard')),
#         (BBQ, _('BBQ')),
#     )
#     dips = SelectMultipleField(
#         blank=True,
#         default='',
#         include_blank=False,
#         max_length=6,
#         max_choices=3,
#         choices=DIP_CHOICES
#     )
# 
#     def __str__(self):
#         return "pk=%s" % force_text(self.pk)
# 
#     def get_absolute_url(self):
#         return reverse('ftw:detail', args=[self.pk])


from .migration_helpers import SouthMigrationTestCase
from .models import ChickenBalls
# -*- coding: utf-8 -*-
from __future__ import unicode_literals




class MyMigrationTestCase(SouthMigrationTestCase):

    start_migration = '0001_initial'
    dest_migration = '0002_auto__add_field_chickenballs_dips'
    django_application = 'suthern'

    def test_field_survives_migration(self):
        self.migrate_to_dest()


# Path: test_projects/django14/suthern/migration_helpers.py
# class SouthMigrationTestCase(TransactionTestCase):
#     """A Test case for testing South migrations."""
# 
#     # Source:
#     # https://micknelson.wordpress.com/2013/03/01/testing-django-migrations/
# 
#     # These must be defined by subclasses.
#     start_migration = None
#     dest_migration = None
#     django_application = None
# 
#     def setUp(self):
#         super(SouthMigrationTestCase, self).setUp()
#         migrations = Migrations(self.django_application)
#         self.start_orm = migrations[self.start_migration].orm()
#         self.dest_orm = migrations[self.dest_migration].orm()
# 
#         # Ensure the migration history is up-to-date with a fake migration.
#         # The other option would be to use the south setting for these tests
#         # so that the migrations are used to setup the test db.
#         call_command('migrate', self.django_application, fake=True,
#                      verbosity=0)
#         # Then migrate back to the start migration.
#         call_command('migrate', self.django_application, self.start_migration,
#                      verbosity=0)
# 
#     def tearDown(self):
#         # Leave the db in the final state so that the test runner doesn't
#         # error when truncating the database.
#         call_command('migrate', self.django_application, verbosity=0)
# 
#     def migrate_to_dest(self):
#         call_command('migrate', self.django_application, self.dest_migration,
#                      verbosity=0)
# 
# Path: test_projects/django14/suthern/models.py
# class ChickenBalls(models.Model):
#     """ChickenBalls is used for South migration testing"""
# 
#     SUICIDE = 's'
#     HOT = 'h'
#     HOME_STYLE = 'H'
#     CAJUN = 'c'
#     JERK = 'j'
#     GATOR = 'g'
#     FLAVOUR_CHOICES = (
#         (_('Hot & Spicy'), (
#             (SUICIDE, _('Suicide hot')),
#             (HOT, _('Hot hot sauce')),
#             (CAJUN, _('Cajun sauce')),
#             (JERK, _('Jerk sauce')))),
#         (_('Traditional'), (
#             (HOME_STYLE, _('Homestyle')),
#             (GATOR, _('Gator flavour')))),
#     )
#     flavour = SelectMultipleField(
#         blank=True,
#         include_blank=False,
#         max_length=5,
#         max_choices=2,
#         choices=FLAVOUR_CHOICES
#     )
#     RANCH = 'r'
#     HONEY_MUSTARD = 'h'
#     BBQ = 'b'
#     DIP_CHOICES = (
#         (RANCH, _('Ranch')),
#         (HONEY_MUSTARD, _('Honey mustard')),
#         (BBQ, _('BBQ')),
#     )
#     dips = SelectMultipleField(
#         blank=True,
#         default='',
#         include_blank=False,
#         max_length=6,
#         max_choices=3,
#         choices=DIP_CHOICES
#     )
# 
#     def __str__(self):
#         return "pk=%s" % force_text(self.pk)
# 
#     def get_absolute_url(self):
#         return reverse('ftw:detail', args=[self.pk])


# Path: test_projects/django14/suthern/tests.py
from .migration_helpers import SouthMigrationTestCase
from .models import ChickenBalls

# -*- coding: utf-8 -*-
from __future__ import unicode_literals




class MyMigrationTestCase(SouthMigrationTestCase):

    start_migration = '0001_initial'
    dest_migration = '0002_auto__add_field_chickenballs_dips'
    django_application = 'suthern'

    def test_field_survives_migration(self):
        self.migrate_to_dest()


        choice_1 = ChickenBalls.HONEY_MUSTARD