Skip to content

Commit 449b6a3

Browse files
committed
Add test
1 parent 088af0f commit 449b6a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/queries_/test_search.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
from django.test import TestCase
22

3-
from .models import Article
4-
53
from django_mongodb_backend.functions import SearchEquals
64

5+
from .models import Article
6+
77

88
class SearchTests(TestCase):
99
def test_1(self):
1010
Article.objects.create(headline="cross", number=1, body="body")
1111
aa = Article.objects.annotate(score=SearchEquals(path="headline", value="cross")).all()
12-
print(aa)
12+
self.assertEqual(aa.score == 1)
13+
# print(aa)

0 commit comments

Comments
 (0)