Skip to content

Commit

Permalink
- extra tests. mroe to be added
Browse files Browse the repository at this point in the history
  • Loading branch information
elipe17 committed Oct 2, 2024
1 parent 1afb129 commit 84999f1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tdrs-backend/tdpservice/search_indexes/test/test_tasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""Tests for search indexes custom tasks."""

import pytest
from django.utils import timezone
from datetime import timedelta
from faker import Faker
from tdpservice.search_indexes.tasks import prettify_time_delta

@pytest.mark.django_db
def test_prettify_time_delta():
"""Test prettify_time_delta."""
start = timezone.now()
end = start + timedelta(seconds=100)

assert prettify_time_delta(start, end) == (1, 40)

0 comments on commit 84999f1

Please sign in to comment.