forked from HHS/TANF-app
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|