Closed Bug 1072633 Opened 10 years ago Closed 10 years ago

Create SessionClient for kuma.users.tests.test_views

Categories

(developer.mozilla.org Graveyard :: Code Cleanup, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: groovecoder, Unassigned)

Details

The kuma.users.tests.test_views:AllauthPersonaTestCase class could use a helper or mixing to encapsulate this logic:

engine = import_module(settings.SESSION_ENGINE)
store = engine.SessionStore()
store.save()
self.client.cookies[settings.SESSION_COOKIE_NAME] = store.session_key
It would be better to have this encapsulated in a custom test client instead as that would not slow down the tests that don't need session access. That way it would be a matter of explicitly using sessions and this work around.
Summary: Create SessionTestCase for kuma.users.tests.test_views → Create SessionClient for kuma.users.tests.test_views
Component: Sign-in → Code Cleanup
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/5743ed2059ccd4dc02ed7ccb789d2f637c2dfc2f
fix bug 1072633 - Add SessionAwareClient class to be able to use session in tests.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.