how to:implementing generator for RecordIp.

This commit is contained in:
mb
2020-08-20 14:47:30 +02:00
parent 9cd3f33475
commit 8b3b577d32
5 changed files with 299 additions and 1 deletions

17
tests/test_permissions.py Normal file
View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Mojib Wali.
#
# invenio-config-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
from invenio_config_tugraz.permissions import RecordIp
def test_recordip():
generator = RecordIp()
assert generator.needs() == []
assert generator.excludes() == []
assert generator.query_filter().to_dict() == {'match_all': {}}