17
17
18
18
class TestPolicyEnvironment :
19
19
def test_get_function_by_name_exists (self ):
20
- function = PolicyFunction (lambda x : 1 , function_name = "foo" )
20
+ function = PolicyFunction (lambda : 1 , function_name = "foo" )
21
21
environment = PolicyEnvironment ([function ])
22
22
23
23
assert environment .get_function_by_name ("foo" ) == function
@@ -33,19 +33,19 @@ def test_get_function_by_name_does_not_exist(self):
33
33
PolicyEnvironment ([], {}),
34
34
PolicyEnvironment (
35
35
[
36
- PolicyFunction (lambda x : 1 , function_name = "foo" ),
36
+ PolicyFunction (lambda : 1 , function_name = "foo" ),
37
37
]
38
38
),
39
39
PolicyEnvironment (
40
40
[
41
- PolicyFunction (lambda x : 1 , function_name = "foo" ),
42
- PolicyFunction (lambda x : 2 , function_name = "bar" ),
41
+ PolicyFunction (lambda : 1 , function_name = "foo" ),
42
+ PolicyFunction (lambda : 2 , function_name = "bar" ),
43
43
]
44
44
),
45
45
],
46
46
)
47
47
def test_upsert_functions (self , environment : PolicyEnvironment ):
48
- new_function = PolicyFunction (lambda x : 3 , function_name = "foo" )
48
+ new_function = PolicyFunction (lambda : 3 , function_name = "foo" )
49
49
new_environment = environment .upsert_functions (new_function )
50
50
51
51
assert new_environment .get_function_by_name ("foo" ) == new_function
0 commit comments