@@ -222,7 +222,8 @@ def test_simple_call_only_status_notifiers(
222
222
commitid = commit .commitid ,
223
223
current_yaml = {"coverage" : {"status" : {"project" : True }}},
224
224
)
225
- expected_result = {
225
+
226
+ assert result == {
226
227
"notified" : True ,
227
228
"notifications" : [
228
229
{
@@ -259,7 +260,7 @@ def test_simple_call_only_status_notifiers(
259
260
"branch" : "test-branch-1" ,
260
261
"message" : "" ,
261
262
"author" : "bateslouis" ,
262
- "timestamp" : "2019-02-01T17:59:47+00:00 " ,
263
+ "timestamp" : "2019-02-01T17:59:47" ,
263
264
"ci_passed" : True ,
264
265
"totals" : {
265
266
"C" : 0 ,
@@ -297,7 +298,7 @@ def test_simple_call_only_status_notifiers(
297
298
"branch" : "master" ,
298
299
"message" : "" ,
299
300
"author" : "bateslouis" ,
300
- "timestamp" : "2019-02-01T17:59:47+00:00 " ,
301
+ "timestamp" : "2019-02-01T17:59:47" ,
301
302
"ci_passed" : True ,
302
303
"totals" : {
303
304
"C" : 0 ,
@@ -338,14 +339,6 @@ def test_simple_call_only_status_notifiers(
338
339
},
339
340
],
340
341
}
341
- assert result is not None
342
- assert (
343
- result ["notifications" ][0 ]["result" ]
344
- == expected_result ["notifications" ][0 ]["result" ]
345
- )
346
- assert result ["notifications" ][0 ] == expected_result ["notifications" ][0 ]
347
- assert result ["notifications" ] == expected_result ["notifications" ]
348
- assert result == expected_result
349
342
350
343
comparison = (
351
344
dbsession .query (CompareCommit )
@@ -430,7 +423,8 @@ def test_simple_call_only_status_notifiers_no_pull_request(
430
423
}
431
424
},
432
425
)
433
- expected_result = {
426
+
427
+ assert result == {
434
428
"notified" : True ,
435
429
"notifications" : [
436
430
{
@@ -501,7 +495,7 @@ def test_simple_call_only_status_notifiers_no_pull_request(
501
495
"branch" : "test-branch-1" ,
502
496
"message" : "" ,
503
497
"author" : "rolabuhasna" ,
504
- "timestamp" : "2019-02-01T17:59:47+00:00 " ,
498
+ "timestamp" : "2019-02-01T17:59:47" ,
505
499
"ci_passed" : True ,
506
500
"totals" : {
507
501
"C" : 0 ,
@@ -539,7 +533,7 @@ def test_simple_call_only_status_notifiers_no_pull_request(
539
533
"branch" : "master" ,
540
534
"message" : "" ,
541
535
"author" : "bateslouis" ,
542
- "timestamp" : "2019-02-01T17:59:47+00:00 " ,
536
+ "timestamp" : "2019-02-01T17:59:47" ,
543
537
"ci_passed" : True ,
544
538
"totals" : {
545
539
"C" : 0 ,
@@ -580,19 +574,6 @@ def test_simple_call_only_status_notifiers_no_pull_request(
580
574
},
581
575
],
582
576
}
583
- assert (
584
- result ["notifications" ][0 ]["result" ]
585
- == expected_result ["notifications" ][0 ]["result" ]
586
- )
587
- assert result ["notifications" ][0 ] == expected_result ["notifications" ][0 ]
588
- assert result ["notifications" ][1 ] == expected_result ["notifications" ][1 ]
589
- assert (
590
- result ["notifications" ][2 ]["result" ]
591
- == expected_result ["notifications" ][2 ]["result" ]
592
- )
593
- assert result ["notifications" ][2 ] == expected_result ["notifications" ][2 ]
594
- assert result ["notifications" ] == expected_result ["notifications" ]
595
- assert result == expected_result
596
577
597
578
@patch ("requests.post" )
598
579
@pytest .mark .django_db
@@ -661,7 +642,8 @@ def test_simple_call_only_status_notifiers_with_pull_request(
661
642
}
662
643
},
663
644
)
664
- expected_result = {
645
+
646
+ assert result == {
665
647
"notified" : True ,
666
648
"notifications" : [
667
649
{
@@ -729,7 +711,7 @@ def test_simple_call_only_status_notifiers_with_pull_request(
729
711
"branch" : "thiago/base-no-base" ,
730
712
"message" : "" ,
731
713
"author" : "rolabuhasna" ,
732
- "timestamp" : "2019-02-01T17:59:47+00:00 " ,
714
+ "timestamp" : "2019-02-01T17:59:47" ,
733
715
"ci_passed" : True ,
734
716
"totals" : {
735
717
"C" : 0 ,
@@ -767,7 +749,7 @@ def test_simple_call_only_status_notifiers_with_pull_request(
767
749
"branch" : "master" ,
768
750
"message" : "" ,
769
751
"author" : "bateslouis" ,
770
- "timestamp" : "2019-02-01T17:59:47+00:00 " ,
752
+ "timestamp" : "2019-02-01T17:59:47" ,
771
753
"ci_passed" : True ,
772
754
"totals" : {
773
755
"C" : 0 ,
@@ -808,7 +790,6 @@ def test_simple_call_only_status_notifiers_with_pull_request(
808
790
},
809
791
],
810
792
}
811
- assert result == expected_result
812
793
813
794
@patch ("requests.post" )
814
795
@pytest .mark .django_db
0 commit comments