Skip to content

Commit

Permalink
Remove namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Sep 10, 2024
1 parent c44a318 commit 6bcc622
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/data_model/TranslationTaskMessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class TranslationTaskMessage(BaseModel):
namespace: str | None
key: str | list[str]
text: str
language_from: str | None
Expand Down
5 changes: 1 addition & 4 deletions src/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@ def test_redis_message_to_ignore(self):
QUEUE.sendMessage().message('{"message_to_ignore":"to_be_written_in_log_file"}').execute()

def test_translations(self):
task = TranslationTaskMessage(
namespace="namespace", key=["key", "1"], text="Hola", language_from="es", languages_to=["en", "fr"]
)
task = TranslationTaskMessage(key=["key", "1"], text="Hola", language_from="es", languages_to=["en", "fr"])

QUEUE.sendMessage(delay=0).message(task.model_dump_json()).execute()

results_message = self.get_results_message()

self.assertEqual("namespace", results_message.namespace)
self.assertEqual(["key", "1"], results_message.key)
self.assertEqual("Hola", results_message.text)
self.assertEqual("es", results_message.language_from)
Expand Down

0 comments on commit 6bcc622

Please sign in to comment.