summaryrefslogtreecommitdiffstats
path: root/python/tests/api_files.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/api_files.py')
-rw-r--r--python/tests/api_files.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/tests/api_files.py b/python/tests/api_files.py
index 41318e25..377b5798 100644
--- a/python/tests/api_files.py
+++ b/python/tests/api_files.py
@@ -45,6 +45,16 @@ def test_file(api):
assert f1edit.revision == f2_rev.revision
assert f2.revision == f2_rev.revision
+ # get redirects (none)
+ assert api.get_file_redirects(f2.ident) == []
+
+ # delete
+ eg = quick_eg(api)
+ api.delete_file(f2.ident, editgroup_id=eg.editgroup_id)
+ api.accept_editgroup(eg.editgroup_id)
+ f2 = api.get_file(f2.ident)
+ assert f2.state == "deleted"
+
def test_file_examples(api):
api.lookup_file(sha256='ffc1005680cb620eec4c913437dfabbf311b535cfe16cbaeb2faec1f92afc362')