diff options
| author | 2022-11-20 13:36:37 +0000 | |
|---|---|---|
| committer | 2022-11-20 13:36:37 +0000 | |
| commit | 7b49952105a808b866625b4fee5a2b4edecfeb6e (patch) | |
| tree | d29cb4ab470e0d23f64e6b478b2e68ba6eea94aa /pydis_site/apps/api/tests | |
| parent | Include users with no messages in response, and simplify response format (diff) | |
| parent | Merge pull request #798 from python-discord/fix-manage-py-no-args (diff) | |
Merge branch 'main' into messages-in-past-n-days-endpoint
Diffstat (limited to 'pydis_site/apps/api/tests')
| -rw-r--r-- | pydis_site/apps/api/tests/test_github_utils.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/pydis_site/apps/api/tests/test_github_utils.py b/pydis_site/apps/api/tests/test_github_utils.py index 2eaf48d9..95bafec0 100644 --- a/pydis_site/apps/api/tests/test_github_utils.py +++ b/pydis_site/apps/api/tests/test_github_utils.py @@ -11,6 +11,7 @@ import rest_framework.response  import rest_framework.test  from django.urls import reverse +from pydis_site import settings  from .. import github_utils @@ -49,7 +50,7 @@ class CheckRunTests(unittest.TestCase):          "head_sha": "sha",          "status": "completed",          "conclusion": "success", -        "created_at": datetime.datetime.utcnow().strftime(github_utils.ISO_FORMAT_STRING), +        "created_at": datetime.datetime.utcnow().strftime(settings.GITHUB_TIMESTAMP_FORMAT),          "artifacts_url": "url",      } @@ -74,7 +75,7 @@ class CheckRunTests(unittest.TestCase):          # to guarantee the right conclusion          kwargs["created_at"] = (              datetime.datetime.utcnow() - github_utils.MAX_RUN_TIME - datetime.timedelta(minutes=10) -        ).strftime(github_utils.ISO_FORMAT_STRING) +        ).strftime(settings.GITHUB_TIMESTAMP_FORMAT)          with self.assertRaises(github_utils.RunTimeoutError):              github_utils.check_run_status(github_utils.WorkflowRun(**kwargs)) @@ -178,7 +179,7 @@ class ArtifactFetcherTests(unittest.TestCase):                  run = github_utils.WorkflowRun(                      name="action_name",                      head_sha="action_sha", -                    created_at=datetime.datetime.now().strftime(github_utils.ISO_FORMAT_STRING), +                    created_at=datetime.datetime.now().strftime(settings.GITHUB_TIMESTAMP_FORMAT),                      status="completed",                      conclusion="success",                      artifacts_url="artifacts_url" | 
