Esempio n. 1
0
def test_published_is_indexed(published):
    assert Content.objects.count() == 1
    assert len(list(Search.search(public=True))) == 1
    assert Content.objects.search("Ikinyugunyugu").count() == 0
    published.title = "Ikinyugunyugu"
    published.save()
    assert Content.objects.count() == 1
    assert Content.objects.search("Ikinyugunyugu").count() == 1
Esempio n. 2
0
def test_document_are_indexed(video):
    assert Search.objects.count() == 1
    assert len(list(Search.search(public=True))) == 1
    assert Document.objects.search("Ikinyugunyugu").count() == 0
    video.title = "Ikinyugunyugu"
    video.save()
    assert Search.objects.count() == 1
    assert Document.objects.search("Ikinyugunyugu").count() == 1
Esempio n. 3
0
def test_deleted_is_indexed(deleted):
    assert Content.objects.count() == 1
    assert len(list(Search.search(public=True))) == 0