示例#1
0
 def test_reset_password_context(self):
     user = UserFactory()
     guid = user._id
     request = RequestFactory().get('/fake_path')
     view = ResetPasswordView()
     view = setup_view(view, request, guid=guid)
     res = view.get_context_data()
     nt.assert_is_instance(res, dict)
     nt.assert_in((user.emails[0], user.emails[0]), view.initial['emails'])
示例#2
0
 def test_reset_password_context(self):
     user = UserFactory()
     guid = user._id
     request = RequestFactory().get('/fake_path')
     view = ResetPasswordView()
     view = setup_view(view, request, guid=guid)
     res = view.get_context_data()
     nt.assert_is_instance(res, dict)
     nt.assert_in((user.emails[0], user.emails[0]), view.initial['emails'])