# Path: nosedjangotests/polls/models.py
# class Poll(models.Model):
#     question = models.CharField(max_length=200)
#     pub_date = models.DateTimeField('date published')
# 
#     @atomic
#     def reset(self):
#         self.question = ""
#         self.save()
# 
# Path: nosedjangotests/polls/tests/test1.py
# def _test_fixtures_2(self):
#     num_polls = Poll.objects.all().count()
#     self.assertEqual(num_polls, 2)
# 
#     fox_poll = Poll.objects.get(pk=1)
#     self.assertEqual(fox_poll.question, 'What does the fox say?')
# 
#     wood_poll = Poll.objects.get(pk=2)
#     self.assertEqual(wood_poll.question, 'Is there fire wood on the island?')
# 
#     new_poll = Poll.objects.create(
#         question="Did my shoes come off in the plane crash?",
#         pub_date=datetime.datetime.now())
#     new_poll.save()


from django.test import TestCase
from nosedjangotests.polls.models import Poll
from nosedjangotests.polls.tests.test1 import _test_fixtures_2



class BaseCase(TestCase):

    def __init__(self, *args, **kwargs):
        inits = ['polls1.json', 'polls2.json']
        self.fixtures = list(inits + getattr(self, 'fixtures', []))
        super(BaseCase, self).__init__(*args, **kwargs)

    def setUp(self):
        pass


class FixtureBleed1TestCase(BaseCase):
    fixtures = [
        'polls1.json',
    ]

    def test_fixtures_loaded(self):
        num_polls = Poll.objects.all().count()
        # Ignore the evil __init__ overriding of self.fixtures
        self.assertEqual(num_polls, 1)


class FixtureBleed2TestCase(TestCase):
    fixtures = ['polls1.json']

    def test_fixture_bleed(self):

# Path: nosedjangotests/polls/models.py
# class Poll(models.Model):
#     question = models.CharField(max_length=200)
#     pub_date = models.DateTimeField('date published')
# 
#     @atomic
#     def reset(self):
#         self.question = ""
#         self.save()
# 
# Path: nosedjangotests/polls/tests/test1.py
# def _test_fixtures_2(self):
#     num_polls = Poll.objects.all().count()
#     self.assertEqual(num_polls, 2)
# 
#     fox_poll = Poll.objects.get(pk=1)
#     self.assertEqual(fox_poll.question, 'What does the fox say?')
# 
#     wood_poll = Poll.objects.get(pk=2)
#     self.assertEqual(wood_poll.question, 'Is there fire wood on the island?')
# 
#     new_poll = Poll.objects.create(
#         question="Did my shoes come off in the plane crash?",
#         pub_date=datetime.datetime.now())
#     new_poll.save()


# Path: nosedjangotests/polls/tests/test2.py
from django.test import TestCase
from nosedjangotests.polls.models import Poll
from nosedjangotests.polls.tests.test1 import _test_fixtures_2




class BaseCase(TestCase):

    def __init__(self, *args, **kwargs):
        inits = ['polls1.json', 'polls2.json']
        self.fixtures = list(inits + getattr(self, 'fixtures', []))
        super(BaseCase, self).__init__(*args, **kwargs)

    def setUp(self):
        pass


class FixtureBleed1TestCase(BaseCase):
    fixtures = [
        'polls1.json',
    ]

    def test_fixtures_loaded(self):
        num_polls = Poll.objects.all().count()
        # Ignore the evil __init__ overriding of self.fixtures
        self.assertEqual(num_polls, 1)


class FixtureBleed2TestCase(TestCase):
    fixtures = ['polls1.json']

    def test_fixture_bleed(self):

        num_polls = Poll.objects.all().count()