# Path: standup/status/tests/factories.py
# class StatusFactory(factory.django.DjangoModelFactory):
#     class Meta:
#         model = 'status.Status'
# 
#     created = fuzzy.FuzzyDateTime(
#         start_dt=datetime(2011, 9, 6, 0, 0, 0, tzinfo=pytz.utc)
#     )
#     user = factory.SubFactory(StandupUserFactory)
#     project = factory.SubFactory(ProjectFactory)
#     content = factory.Faker('sentence')


from django.core.urlresolvers import reverse
from django.test import override_settings, TestCase
from standup.status.tests.factories import StatusFactory



class HomeViewTestCase(TestCase):
    def test_empty(self):
        resp = self.client.get(reverse('status.index'))
        assert resp.status_code == 200
        self.assertContains(resp, 'No status updates available')

    def test_single_page(self):
        # The page length is 20, so we build just 5
        StatusFactory.create_batch(5)
        resp = self.client.get(reverse('status.index'))

# Path: standup/status/tests/factories.py
# class StatusFactory(factory.django.DjangoModelFactory):
#     class Meta:
#         model = 'status.Status'
# 
#     created = fuzzy.FuzzyDateTime(
#         start_dt=datetime(2011, 9, 6, 0, 0, 0, tzinfo=pytz.utc)
#     )
#     user = factory.SubFactory(StandupUserFactory)
#     project = factory.SubFactory(ProjectFactory)
#     content = factory.Faker('sentence')


# Path: standup/status/tests/test_views.py
from django.core.urlresolvers import reverse
from django.test import override_settings, TestCase
from standup.status.tests.factories import StatusFactory




class HomeViewTestCase(TestCase):
    def test_empty(self):
        resp = self.client.get(reverse('status.index'))
        assert resp.status_code == 200
        self.assertContains(resp, 'No status updates available')

    def test_single_page(self):
        # The page length is 20, so we build just 5
        StatusFactory.create_batch(5)
        resp = self.client.get(reverse('status.index'))

        assert resp.status_code == 200