Fix actor, director tests using freeze time by ignoring transformers package

transformers package was causing freeze time to fail during setup
This commit is contained in:
Debanjum Singh Solanky
2024-02-05 20:02:54 +05:30
parent c40f642afa
commit 0d949140f4
4 changed files with 15 additions and 13 deletions

View File

@@ -301,11 +301,14 @@ def test_answer_not_known_using_notes_command(client_offline_chat, default_user2
@pytest.mark.xfail(AssertionError, reason="Chat director not capable of answering time aware questions yet")
@pytest.mark.chatquality
@pytest.mark.django_db(transaction=True)
@freeze_time("2023-04-01")
@freeze_time("2023-04-01", ignore=["transformers"])
def test_answer_requires_current_date_awareness(client_offline_chat):
"Chat actor should be able to answer questions relative to current date using provided notes"
# Arrange
query = urllib.parse.quote("Where did I have lunch today?")
# Act
response = client_offline_chat.get(f'/api/chat?q="Where did I have lunch today?"&stream=true')
response = client_offline_chat.get(f"/api/chat?q={query}&stream=true")
response_message = response.content.decode("utf-8")
# Assert
@@ -320,7 +323,7 @@ def test_answer_requires_current_date_awareness(client_offline_chat):
@pytest.mark.xfail(AssertionError, reason="Chat director not capable of answering this question yet")
@pytest.mark.chatquality
@pytest.mark.django_db(transaction=True)
@freeze_time("2023-04-01")
@freeze_time("2023-04-01", ignore=["transformers"])
def test_answer_requires_date_aware_aggregation_across_provided_notes(client_offline_chat):
"Chat director should be able to answer questions that require date aware aggregation across multiple notes"
# Act