From fc516d56f94b4912e7b67a07d434a022de4c4a9a Mon Sep 17 00:00:00 2001 From: Coki Date: Mon, 25 Nov 2024 20:29:43 +0800 Subject: [PATCH] test: update test description for mixed filter --- tests/test_filter.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_filter.py b/tests/test_filter.py index d98878d..0160325 100644 --- a/tests/test_filter.py +++ b/tests/test_filter.py @@ -12,14 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import casbin +import os from unittest import TestCase +import casbin from tests.test_enforcer import get_examples from casbin.persist.adapters import FilteredFileAdapter from casbin.persist.adapters.filtered_file_adapter import filter_line, filter_words -import tempfile -import shutil -import os class Filter: @@ -171,7 +169,7 @@ def test_empty_string_filter(self): self.assertTrue(e.has_policy(["admin", "domain2", "data2", "read"])) def test_mixed_empty_filter(self): - """测试混合空字符串和非空字符串的过滤器""" + """Test the filter for mixed empty and non-empty strings.""" adapter = FilteredFileAdapter(get_examples("rbac_with_domains_policy.csv")) e = casbin.Enforcer(get_examples("rbac_with_domains_model.conf"), adapter) filter = Filter()