29
29
import tempfile
30
30
import time
31
31
import datetime
32
- import unittest
33
32
from unittest .mock import patch
34
33
35
34
import httpx
@@ -505,6 +504,7 @@ async def test_get_authorization(servicex):
505
504
r = await servicex ._get_authorization ()
506
505
get_token .assert_called_once ()
507
506
507
+
508
508
@pytest .mark .asyncio
509
509
@patch ("servicex.servicex_adapter.ClientSession.get" )
510
510
async def test_get_transformation_results_success (get_transformation_results , servicex ):
@@ -519,12 +519,15 @@ async def test_get_transformation_results_success(get_transformation_results, se
519
519
headers = {},
520
520
params = {
521
521
"begin_at" : now .isoformat (),
522
- }
522
+ },
523
523
)
524
524
525
+
525
526
@pytest .mark .asyncio
526
527
@patch ("servicex.servicex_adapter.ClientSession.get" )
527
- async def test_get_transformation_results_not_found (get_transformation_results , servicex ):
528
+ async def test_get_transformation_results_not_found (
529
+ get_transformation_results , servicex
530
+ ):
528
531
get_transformation_results .return_value .__aenter__ .return_value .status = 404
529
532
request_id = "123-45-6789"
530
533
now = datetime .datetime .now (datetime .timezone .utc )
@@ -537,12 +540,15 @@ async def test_get_transformation_results_not_found(get_transformation_results,
537
540
headers = {},
538
541
params = {
539
542
"begin_at" : now .isoformat (),
540
- }
543
+ },
541
544
)
542
545
546
+
543
547
@pytest .mark .asyncio
544
548
@patch ("servicex.servicex_adapter.ClientSession.get" )
545
- async def test_get_transformation_results_not_authorized (get_transformation_results , servicex ):
549
+ async def test_get_transformation_results_not_authorized (
550
+ get_transformation_results , servicex
551
+ ):
546
552
get_transformation_results .return_value .__aenter__ .return_value .status = 403
547
553
request_id = "123-45-6789"
548
554
now = datetime .datetime .now (datetime .timezone .utc )
@@ -555,12 +561,15 @@ async def test_get_transformation_results_not_authorized(get_transformation_resu
555
561
headers = {},
556
562
params = {
557
563
"begin_at" : now .isoformat (),
558
- }
564
+ },
559
565
)
560
566
567
+
561
568
@pytest .mark .asyncio
562
569
@patch ("servicex.servicex_adapter.ClientSession.get" )
563
- async def test_get_transformation_results_server_error (get_transformation_results , servicex ):
570
+ async def test_get_transformation_results_server_error (
571
+ get_transformation_results , servicex
572
+ ):
564
573
get_transformation_results .return_value .__aenter__ .return_value .status = 500
565
574
request_id = "123-45-6789"
566
575
now = datetime .datetime .now (datetime .timezone .utc )
@@ -573,5 +582,5 @@ async def test_get_transformation_results_server_error(get_transformation_result
573
582
headers = {},
574
583
params = {
575
584
"begin_at" : now .isoformat (),
576
- }
585
+ },
577
586
)
0 commit comments