Capture the language preference set by an anonymous user when the register or login

[LEARNER-168]
This commit is contained in:
Calen Pennington
2017-05-10 15:27:01 -04:00
parent 956207b932
commit c9f6872be3
3 changed files with 79 additions and 20 deletions

View File

@@ -84,9 +84,11 @@ class UserFactory(DjangoModelFactory):
model = User
django_get_or_create = ('email', 'username')
_DEFAULT_PASSWORD = 'test'
username = factory.Sequence(u'robot{0}'.format)
email = factory.Sequence(u'robot+test+{0}@edx.org'.format)
password = factory.PostGenerationMethodCall('set_password', 'test')
password = factory.PostGenerationMethodCall('set_password', _DEFAULT_PASSWORD)
first_name = factory.Sequence(u'Robot{0}'.format)
last_name = 'Test'
is_staff = False