File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,10 @@ def test_contains():
70
70
71
71
limit "Limit for Alice and Bob" contains(users, user): 5
72
72
limit "Limit for era5" (dataset() == "era5") && !(user in users): 10
73
+ limit "Limit for alice" "lice" in user: 1
73
74
"""
74
75
)
75
- assert len (rules .global_limits ) == 2
76
+ assert len (rules .global_limits ) == 3
76
77
request_david = collections .namedtuple ("SystemRequest" , ["user_uid" , "dataset" ])(
77
78
user_uid = "david" , dataset = "era5"
78
79
)
@@ -90,6 +91,10 @@ def test_contains():
90
91
assert not rules .global_limits [1 ].match (request_bob )
91
92
assert rules .global_limits [1 ].match (request_david )
92
93
94
+ assert rules .global_limits [2 ].match (request_alice )
95
+ assert not rules .global_limits [2 ].match (request_bob )
96
+ assert not rules .global_limits [2 ].match (request_david )
97
+
93
98
94
99
def test_dynamic_prorities ():
95
100
request_alice = collections .namedtuple ("SystemRequest" , "user_uid" )(
You can’t perform that action at this time.
0 commit comments