'Test published model property.'

@patch('mozillians.announcements.models.timezone')
def test_published(self, mock_obj):

    first = AnnouncementFactory.create(publish_from=make_aware(datetime(2013, 2, 12), utc), publish_until=make_aware(datetime(2013, 2, 18), utc))
    second = AnnouncementFactory.create(publish_from=make_aware(datetime(2013, 2, 15), utc), publish_until=make_aware(datetime(2013, 2, 17), utc))
    third = AnnouncementFactory.create(publish_from=make_aware(datetime(2013, 2, 21), utc), publish_until=make_aware(datetime(2013, 2, 23), utc))
    mock_obj.now.return_value = make_aware(datetime(2013, 2, 16), utc)
    ok_(first.published)
    ok_(second.published)
    ok_((not third.published))
