@@ -34,7 +34,7 @@ class DummyBot():
3434 user_agent = "CloudBot/3.0"
3535
3636
37- @pytest . mark . httpretty
37+ @httpretty . activate
3838def test_bans ():
3939 """
4040 tests fishbans with a successful API response having multiple bans
@@ -44,7 +44,7 @@ def test_bans():
4444 assert fishbans (test_user , DummyBot ) == bans_reply
4545
4646
47- @pytest . mark . httpretty
47+ @httpretty . activate
4848def test_bans_single ():
4949 """
5050 tests fishbans with a successful API response having a single ban
@@ -53,7 +53,8 @@ def test_bans_single():
5353
5454 assert fishbans (test_user , DummyBot ) == bans_reply_single
5555
56- @pytest .mark .httpretty
56+
57+ @httpretty .activate
5758def test_bans_failed ():
5859 """
5960 tests fishbans with a failed API response
@@ -63,7 +64,7 @@ def test_bans_failed():
6364 assert fishbans (test_user , DummyBot ) == reply_failed
6465
6566
66- @pytest . mark . httpretty
67+ @httpretty . activate
6768def test_bans_none ():
6869 """
6970 tests fishbans with a successful API response having no bans
@@ -73,7 +74,7 @@ def test_bans_none():
7374 assert fishbans (test_user , DummyBot ) == bans_reply_none
7475
7576
76- @pytest . mark . httpretty
77+ @httpretty . activate
7778def test_bans_error ():
7879 """
7980 tests fishbans with a HTTP error
@@ -83,7 +84,7 @@ def test_bans_error():
8384 assert fishbans (test_user , DummyBot ) == reply_error
8485
8586
86- @pytest . mark . httpretty
87+ @httpretty . activate
8788def test_count ():
8889 """
8990 tests bancount with a successful API response having multiple bans
@@ -93,7 +94,7 @@ def test_count():
9394 assert bancount (test_user , DummyBot ) == count_reply
9495
9596
96- @pytest . mark . httpretty
97+ @httpretty . activate
9798def test_count_failed ():
9899 """
99100 tests bancount with a failed API response
@@ -103,7 +104,7 @@ def test_count_failed():
103104 assert bancount (test_user , DummyBot ) == reply_failed
104105
105106
106- @pytest . mark . httpretty
107+ @httpretty . activate
107108def test_count_none ():
108109 """
109110 tests bancount with a successful API response having no bans
@@ -112,8 +113,7 @@ def test_count_none():
112113
113114 assert bancount (test_user , DummyBot ) == count_reply_none
114115
115-
116- @pytest .mark .httpretty
116+ @httpretty .activate
117117def test_count_error ():
118118 """
119119 tests bancount with a HTTP error
0 commit comments