Skip to content

Commit cdfc106

Browse files
committed
wtf
1 parent 283360f commit cdfc106

File tree

1 file changed

+12
-31
lines changed

1 file changed

+12
-31
lines changed

tasks/tests/integration/test_notify_task.py

+12-31
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ def test_simple_call_only_status_notifiers(
222222
commitid=commit.commitid,
223223
current_yaml={"coverage": {"status": {"project": True}}},
224224
)
225-
expected_result = {
225+
226+
assert result == {
226227
"notified": True,
227228
"notifications": [
228229
{
@@ -259,7 +260,7 @@ def test_simple_call_only_status_notifiers(
259260
"branch": "test-branch-1",
260261
"message": "",
261262
"author": "bateslouis",
262-
"timestamp": "2019-02-01T17:59:47+00:00",
263+
"timestamp": "2019-02-01T17:59:47",
263264
"ci_passed": True,
264265
"totals": {
265266
"C": 0,
@@ -297,7 +298,7 @@ def test_simple_call_only_status_notifiers(
297298
"branch": "master",
298299
"message": "",
299300
"author": "bateslouis",
300-
"timestamp": "2019-02-01T17:59:47+00:00",
301+
"timestamp": "2019-02-01T17:59:47",
301302
"ci_passed": True,
302303
"totals": {
303304
"C": 0,
@@ -338,14 +339,6 @@ def test_simple_call_only_status_notifiers(
338339
},
339340
],
340341
}
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
349342

350343
comparison = (
351344
dbsession.query(CompareCommit)
@@ -430,7 +423,8 @@ def test_simple_call_only_status_notifiers_no_pull_request(
430423
}
431424
},
432425
)
433-
expected_result = {
426+
427+
assert result == {
434428
"notified": True,
435429
"notifications": [
436430
{
@@ -501,7 +495,7 @@ def test_simple_call_only_status_notifiers_no_pull_request(
501495
"branch": "test-branch-1",
502496
"message": "",
503497
"author": "rolabuhasna",
504-
"timestamp": "2019-02-01T17:59:47+00:00",
498+
"timestamp": "2019-02-01T17:59:47",
505499
"ci_passed": True,
506500
"totals": {
507501
"C": 0,
@@ -539,7 +533,7 @@ def test_simple_call_only_status_notifiers_no_pull_request(
539533
"branch": "master",
540534
"message": "",
541535
"author": "bateslouis",
542-
"timestamp": "2019-02-01T17:59:47+00:00",
536+
"timestamp": "2019-02-01T17:59:47",
543537
"ci_passed": True,
544538
"totals": {
545539
"C": 0,
@@ -580,19 +574,6 @@ def test_simple_call_only_status_notifiers_no_pull_request(
580574
},
581575
],
582576
}
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
596577

597578
@patch("requests.post")
598579
@pytest.mark.django_db
@@ -661,7 +642,8 @@ def test_simple_call_only_status_notifiers_with_pull_request(
661642
}
662643
},
663644
)
664-
expected_result = {
645+
646+
assert result == {
665647
"notified": True,
666648
"notifications": [
667649
{
@@ -729,7 +711,7 @@ def test_simple_call_only_status_notifiers_with_pull_request(
729711
"branch": "thiago/base-no-base",
730712
"message": "",
731713
"author": "rolabuhasna",
732-
"timestamp": "2019-02-01T17:59:47+00:00",
714+
"timestamp": "2019-02-01T17:59:47",
733715
"ci_passed": True,
734716
"totals": {
735717
"C": 0,
@@ -767,7 +749,7 @@ def test_simple_call_only_status_notifiers_with_pull_request(
767749
"branch": "master",
768750
"message": "",
769751
"author": "bateslouis",
770-
"timestamp": "2019-02-01T17:59:47+00:00",
752+
"timestamp": "2019-02-01T17:59:47",
771753
"ci_passed": True,
772754
"totals": {
773755
"C": 0,
@@ -808,7 +790,6 @@ def test_simple_call_only_status_notifiers_with_pull_request(
808790
},
809791
],
810792
}
811-
assert result == expected_result
812793

813794
@patch("requests.post")
814795
@pytest.mark.django_db

0 commit comments

Comments
 (0)