6
6
from openforms .forms .tests .factories import FormStepFactory
7
7
from openforms .submissions .tests .factories import SubmissionFactory
8
8
9
- from ..utils import get_cosign_login_info , store_auth_details , store_registrator_details
9
+ from ..utils import get_cosign_login_url , store_auth_details , store_registrator_details
10
10
11
11
12
12
class UtilsTests (TestCase ):
@@ -28,22 +28,6 @@ def test_store_registrator_details(self):
28
28
{"plugin" : "digid" , "attribute" : "WRONG" , "value" : "some-value" },
29
29
)
30
30
31
- def test_get_cosign_info_when_no_cosign_on_form (self ):
32
- form_step = FormStepFactory .create (
33
- form_definition__configuration = {
34
- "components" : [
35
- {"key" : "textField" , "label" : "Not cosign" , "type" : "textfield" }
36
- ]
37
- }
38
- )
39
-
40
- factory = RequestFactory ()
41
- request = factory .get ("/foo" )
42
-
43
- login_info = get_cosign_login_info (request = request , form = form_step .form )
44
-
45
- self .assertIsNone (login_info )
46
-
47
31
def test_get_cosign_info (self ):
48
32
form_step = FormStepFactory .create (
49
33
form__slug = "form-with-cosign" ,
@@ -62,11 +46,11 @@ def test_get_cosign_info(self):
62
46
factory = RequestFactory ()
63
47
request = factory .get ("/foo" )
64
48
65
- login_info = get_cosign_login_info (request = request , form = form_step .form )
66
-
67
- self .assertIsNotNone (login_info )
49
+ login_url = get_cosign_login_url (
50
+ request = request , form = form_step .form , plugin_id = "digid"
51
+ )
52
+ login_url = furl (login_url )
68
53
69
- login_url = furl (login_info .url )
70
54
submission_find_url = furl (
71
55
login_url .args ["next" ]
72
56
) # Page where the user will look for the submission to cosign
0 commit comments