def METHOD_NAME(self, project):
    """Test that the old search queries are being deleted."""
    assert (
        SearchQuery.objects.all().count() == 0
    ), "no SearchQuery should be present if there is no search made."
    obj = SearchQuery.objects.create(
        project=project, version=project.versions.all().first(), query="first"
    )
    obj.created = timezone.make_aware(timezone.datetime(2019, 1, 1))
    obj.save()
    assert SearchQuery.objects.all().count() == 1
    tasks.delete_old_search_queries_from_db()
    assert SearchQuery.objects.all().count() == 0