Exemple #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
Exemple #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
Exemple #3
0
def test_modified_today():
    assert NoteFactory().modified_today() is True
Exemple #4
0
def test_str():
    str(NoteFactory())
Exemple #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)