@@ -12,19 +12,19 @@ from django.core.management import call_command
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def sites(db): # pylint: disable=unused-argument
|
||||
def sites(db):
|
||||
Site.objects.create(name='cms', domain='localhost:8031')
|
||||
Site.objects.create(name='lms', domain='localhost:8003')
|
||||
|
||||
|
||||
def test_localhost(db, monkeypatch, sites): # pylint: disable=redefined-outer-name,unused-argument
|
||||
def test_localhost(db, monkeypatch, sites):
|
||||
monkeypatch.delitem(os.environ, 'BOK_CHOY_HOSTNAME', raising=False)
|
||||
call_command('update_fixtures')
|
||||
assert Site.objects.get(name='cms').domain == 'localhost:8031'
|
||||
assert Site.objects.get(name='lms').domain == 'localhost:8003'
|
||||
|
||||
|
||||
def test_devstack_cms(db, monkeypatch, sites): # pylint: disable=redefined-outer-name,unused-argument
|
||||
def test_devstack_cms(db, monkeypatch, sites):
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_HOSTNAME', 'edx.devstack.cms')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_CMS_PORT', '18031')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_LMS_PORT', '18003')
|
||||
@@ -33,7 +33,7 @@ def test_devstack_cms(db, monkeypatch, sites): # pylint: disable=redefined-oute
|
||||
assert Site.objects.get(name='lms').domain == 'edx.devstack.cms:18003'
|
||||
|
||||
|
||||
def test_devstack_lms(db, monkeypatch, sites): # pylint: disable=redefined-outer-name,unused-argument
|
||||
def test_devstack_lms(db, monkeypatch, sites):
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_HOSTNAME', 'edx.devstack.lms')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_CMS_PORT', '18031')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_LMS_PORT', '18003')
|
||||
|
||||
2
pylintrc
2
pylintrc
@@ -72,7 +72,7 @@
|
||||
[MASTER]
|
||||
ignore = ,.git,.tox,migrations,node_modules,.pycharm_helpers
|
||||
persistent = yes
|
||||
load-plugins = edx_lint.pylint,pylint_django_settings,pylint_django,pylint_celery
|
||||
load-plugins = edx_lint.pylint,pylint_django_settings,pylint_django,pylint_celery,pylint_pytest
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
enable =
|
||||
|
||||
@@ -48,3 +48,5 @@ tox # virtualenv management for tests
|
||||
tox-battery # Makes tox aware of requirements file changes
|
||||
transifex-client # Command-line interface for the Transifex localization service
|
||||
unidiff # Required by coverage_pytest_plugin
|
||||
pylint-pytest==0.3.0 # A Pylint plugin to suppress pytest-related false positives.
|
||||
|
||||
|
||||
@@ -301,6 +301,7 @@ xblock==1.4.0 # via -r requirements/edx/base.txt, acid-xblock, crowd
|
||||
xmlsec==1.3.9 # via -r requirements/edx/base.txt, python3-saml
|
||||
xss-utils==0.2.0 # via -r requirements/edx/base.txt
|
||||
zipp==1.0.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/coverage.txt, importlib-metadata
|
||||
pylint-pytest==0.3.0
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
||||
|
||||
Reference in New Issue
Block a user