Skip to content

Commit 3f974b1

Browse files
committed
tests: remove google translate tests
1 parent d8ac8af commit 3f974b1

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

glossary_resources/tests.py

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import pytest
2-
from decouple import config
32

43
from daras_ai.image_input import gcs_blob_for
5-
from daras_ai_v2 import settings
64
from daras_ai_v2.crypto import get_random_doc_id
75
from glossary_resources.models import GlossaryResource
8-
from tests.test_translation import google_translate_check
96

107
GLOSSARY = [
118
{
@@ -36,29 +33,6 @@
3633
},
3734
]
3835

39-
TRANSLATION_TESTS_GLOSSARY = [
40-
(
41-
"एक एकड़ भूमि के लिए कितनी अग्निअस्त्र की आवश्यकता होती है", # source
42-
"how many fire extinguishers are required for one acre of land", # default translation
43-
"how many agniastra are required for one acre of land", # using glossary
44-
),
45-
(
46-
"गुई डॉट ए आई से हम क्या कर सकते हैं",
47-
"What can we do with Gui.AI",
48-
"What can we do with Gooey.AI",
49-
),
50-
(
51-
"गुई ए आई से हम क्या कर सकते हैं",
52-
"What can we do with AI",
53-
"What can we do with Gooey.AI",
54-
),
55-
(
56-
"मेरे मिर्ची पर लाल धब्बे आ गये हैं",
57-
"My chillies have got red spots",
58-
"My Jalapeño have got red spots",
59-
),
60-
]
61-
6236

6337
@pytest.fixture
6438
def glossary_url():
@@ -73,22 +47,3 @@ def glossary_url():
7347
finally:
7448
blob.delete()
7549
GlossaryResource.objects.all().delete()
76-
77-
78-
@pytest.mark.skipif(
79-
not settings.GS_BUCKET_NAME or not config("RUN_GOOGLE_TRANSLATE_TESTS", None),
80-
reason="No bucket name or run google translate tests",
81-
)
82-
def test_google_translate_glossary(transactional_db, glossary_url, threadpool_subtest):
83-
for text, expected, expected_with_glossary in TRANSLATION_TESTS_GLOSSARY:
84-
threadpool_subtest(
85-
google_translate_check,
86-
text,
87-
expected,
88-
)
89-
threadpool_subtest(
90-
google_translate_check,
91-
text,
92-
expected_with_glossary,
93-
glossary_url=glossary_url,
94-
)

0 commit comments

Comments
 (0)