File tree 2 files changed +1
-27
lines changed
2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change 3
3
import pytest
4
4
5
5
6
- @pytest .mark .parametrize (
7
- "student,employee" ,
8
- [
9
- (["loser" ], ["winner" ]),
10
- (["winner" ], None ),
11
- (None , ["winner" ]),
12
- ([], ["winner" ]),
13
- (["winner" ], []),
14
- ],
15
- )
16
- def test_cascadia_employee_attributes (student , employee ):
17
- """
18
- Cascadia Employees should come across as such, but our test one comes
19
- through as a student. This checks that if either one is set, we get
20
- a value for remote_user. It's still entirely possible for student to
21
- win out.
22
- """
23
- prefix = "urn:mace:washington.edu:dir:attribute-def"
24
- attrs = {}
25
- if student is not None :
26
- attrs [f"{ prefix } :stu-validationID" ] = student
27
- if employee is not None :
28
- attrs [f"{ prefix } :emp-validationID" ] = employee
29
- mapped_attrs = dict (attribute .map (attrs , federated .CascadiaEmployeeIdp ))
30
- assert mapped_attrs ["remote_user" ] == "winner"
31
-
32
-
33
6
def test_scca_dynamic_entity_id ():
34
7
entity_id = "https://example.com"
35
8
scca = federated .SccaIdp (entity_id )
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ class CascadiaIdp(IdpConfig):
33
33
krm7bWjDEu8/wRKVz894pKIC/oiklg==
34
34
"""
35
35
36
+
36
37
class CollegenetIdp (IdpConfig ):
37
38
"""
38
39
One thing of note about collegenet is that it encrypts attributes and thus
You can’t perform that action at this time.
0 commit comments