예제 #1
0
def test_modified_yesterday():
    yesterday = timezone.now() - timedelta(days=1)
    obj = NoteFactory()
    obj.created = yesterday
    obj.save()
    assert obj.modified_today() is False
예제 #2
0
def test_modified_tomorrow():
    tomorrow = timezone.now() + timedelta(days=1)
    obj = NoteFactory()
    obj.created = tomorrow
    obj.save()
    assert obj.modified_today() is False
예제 #3
0
def test_modified_today():
    assert NoteFactory().modified_today() is True
예제 #4
0
def test_str():
    str(NoteFactory())
예제 #5
0
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)