diff options
Diffstat (limited to 'tests/test_admin.py')
-rw-r--r-- | tests/test_admin.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_admin.py b/tests/test_admin.py index 6a72ed7..887ed14 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py | |||
@@ -120,3 +120,17 @@ def test_admin_trends(api2): | |||
120 | def test_admin_accountrequests(api2): | 120 | def test_admin_accountrequests(api2): |
121 | pass | 121 | pass |
122 | 122 | ||
123 | @pytest.mark.vcr() | ||
124 | def test_admin_domain_blocks(api2): | ||
125 | block = api2.admin_create_domain_block(domain = "https://chitter.xyz/", public_comment="sicko behaviour", severity="suspend") | ||
126 | assert isinstance(api2.admin_domain_blocks(), list) | ||
127 | block2 = api2.admin_domain_blocks(block) | ||
128 | assert block.severity == "suspend" | ||
129 | assert block.public_comment == "sicko behaviour" | ||
130 | assert block.severity == block2.severity | ||
131 | block3 = api2.admin_update_domain_block(block, severity="silence", private_comment="jk ilu <3") | ||
132 | assert block3.severity == "silence" | ||
133 | assert block3.public_comment == "sicko behaviour" | ||
134 | assert block3.private_comment == "jk ilu <3" | ||
135 | api2.admin_delete_domain_block(block2) | ||
136 | assert not block3.id in map(lambda x: x.id, api2.admin_domain_blocks()) | ||