def test_expiry_update(self): """Test expiry is updated when reviewer reloads his queue.""" self.theme_factory() reviewer = self.create_and_become_reviewer() self.get_themes(reviewer) ThemeLock.objects.filter(reviewer=reviewer).update(expiry=days_ago(1)) _get_themes(mock.Mock(), reviewer, flagged=self.flagged) self.get_themes(reviewer) eq_(ThemeLock.objects.filter(reviewer=reviewer)[0].expiry > days_ago(1), True)
def test_expiry_update(self): """Test expiry is updated when reviewer reloads his queue.""" addon_factory(type=amo.ADDON_PERSONA, status=self.status) reviewer = self.create_and_become_reviewer() _get_themes(mock.Mock(), reviewer, flagged=self.flagged) ThemeLock.objects.filter(reviewer=reviewer).update(expiry=days_ago(1)) _get_themes(mock.Mock(), reviewer, flagged=self.flagged) eq_(ThemeLock.objects.filter(reviewer=reviewer)[0].expiry > days_ago(1), True)