None of the existing bok-choy tests in edx-platform reference the Django
settings, because the tests are running against servers in separate
processes with two different sets of settings (one for LMS, one for Studio).
You should be able to work around the need for AUTH_USER_MODEL by using
django.contrib.auth.models.User directly, but you generally shouldn't try
to work with Django models in bok-choy tests.  You can import some code
from the openedx and xmodule packages in the bok-choy tests, but without
Django running in the same process it usually isn't very useful.  The vast
majority of our test cases rely primarily on the selenium and bok-choy APIs
to work with the browser, not the server implementation.

On Wed, May 9, 2018 at 2:17 AM, Pravin Chavre <[email protected]>
wrote:

> Hi!
>
> I ran the acceptance tests for a particular class. The steps I followed
> are as follows:
>
> cd /edx/app/edxapp/edx-platform
> sudo -H -u edxapp bash
> source /edx/app/edxapp/edxapp_env
> paver test_bokchoy -t lms/test_account_settings.py:AccountSettingsPageTest
>
> I got the following error:
>
> ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are
> not configured. You must either define the environment variable
> DJANGO_SETTINGS_MODULE or call settings.configure() before accessing
> settings.
>
> How to fix this?
>
> Please let me know in the test environment which settings, packages or
> modules are imported when the bokchoy acceptance test cases are
> run/executed and how to import settings, packages or modules for running
> open edX the test cases successfully.
>
> --
> You received this message because you are subscribed to the Google Groups
> "General Open edX discussion" group.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/edx-code/c34ec7fe-63c9-4eaa-a7ed-ebb69f6ff030%40googlegroups.com
> <https://groups.google.com/d/msgid/edx-code/c34ec7fe-63c9-4eaa-a7ed-ebb69f6ff030%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>



-- 
Jeremy Bowman
Principal Software Engineer
edX
141 Portland St.
Cambridge, MA 02139
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/CABQueNnwU62DfdK3-HiFniRZyufWecBSkhiJ6887fuoD4mLNFA%40mail.gmail.com.

Reply via email to