def test_modified_yesterday(): yesterday = timezone.now() - timedelta(days=1) obj = NoteFactory() obj.created = yesterday obj.save() assert obj.modified_today() is False
def test_modified_tomorrow(): tomorrow = timezone.now() + timedelta(days=1) obj = NoteFactory() obj.created = tomorrow obj.save() assert obj.modified_today() is False
def test_modified_today(): assert NoteFactory().modified_today() is True
def test_str(): str(NoteFactory())
def test_search_methods(): check_search_methods(NoteFactory())
def test_note_update(perm_check): note = NoteFactory() url = reverse('crm.note.update', kwargs={'pk': note.pk}) perm_check.staff(url)