Esempio n. 1
0
    def test_wraps_email_module_as_signup_email(self, patch, pyramid_request):
        signup_email = patch('h.emails.signup.generate')
        svc = user_signup_service_factory(None, pyramid_request)

        svc.signup_email(id=123, email='*****@*****.**', activation_code='abc456')

        signup_email.assert_called_once_with(pyramid_request,
                                             id=123,
                                             email='*****@*****.**',
                                             activation_code='abc456')
Esempio n. 2
0
    def test_wraps_email_module_as_signup_email(self, patch, pyramid_request):
        signup_email = patch('h.emails.signup.generate')
        svc = user_signup_service_factory(None, pyramid_request)

        svc.signup_email(id=123, email='*****@*****.**', activation_code='abc456')

        signup_email.assert_called_once_with(pyramid_request,
                                             id=123,
                                             email='*****@*****.**',
                                             activation_code='abc456')
Esempio n. 3
0
    def test_provides_request_stats_as_stats(self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert svc.stats == pyramid_request.stats
Esempio n. 4
0
    def test_provides_request_db_as_session(self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert svc.session == pyramid_request.db
Esempio n. 5
0
    def test_provides_request_auth_domain_as_default_authority(
            self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert svc.default_authority == pyramid_request.auth_domain
Esempio n. 6
0
    def test_returns_user_signup_service(self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert isinstance(svc, UserSignupService)
Esempio n. 7
0
    def test_provides_request_stats_as_stats(self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert svc.stats == pyramid_request.stats
Esempio n. 8
0
    def test_provides_request_db_as_session(self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert svc.session == pyramid_request.db
Esempio n. 9
0
    def test_provides_request_auth_domain_as_default_authority(self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert svc.default_authority == pyramid_request.auth_domain
Esempio n. 10
0
    def test_returns_user_signup_service(self, pyramid_request):
        svc = user_signup_service_factory(None, pyramid_request)

        assert isinstance(svc, UserSignupService)