'Test published() of Announcement Manager.'

@patch('mozillians.announcements.managers.datetime')
def test_published(self, mock_obj):

    mock_obj.now.return_value = datetime(2013, 2, 10)
    eq_(Announcement.objects.published().count(), 0)
    mock_obj.now.return_value = datetime(2013, 2, 13)
    eq_(Announcement.objects.published().count(), 1)
    mock_obj.now.return_value = datetime(2013, 2, 16)
    eq_(Announcement.objects.published().count(), 2)
    mock_obj.now.return_value = datetime(2013, 2, 19)
    eq_(Announcement.objects.published().count(), 0)
    mock_obj.now.return_value = datetime(2013, 2, 24)
    eq_(Announcement.objects.published().count(), 0)
