Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ language: python
python:
- "2.7"

services:
- mongodb

node_js: 6

cache:
Expand All @@ -20,10 +23,9 @@ install:

env:
- TOXENV=pep8
- TOXENV=py27-django111
ARGS="-- paver run_pep8"
- TOXENV=py27-django111
ARGS="-- pytest common/djangoapps/student/tests/test_helpers.py::TestDestroyOAuthTokensHelper"
- TOXENV=py27-paver-pep8
- TOXENV=py27-studio
- TOXENV=py27-lms

script:
- tox $ARGS
2 changes: 2 additions & 0 deletions common/test/appsembler/customer_themes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Empty file.
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
"""
Tests for site configuration's Tahoe customizations.
"""
from mock import patch
import unittest
from os import getenv

from django.test import TestCase
from django.db import IntegrityError, transaction
from django.conf import settings
from django.contrib.sites.models import Site
from django.test import TestCase
from django.test.utils import override_settings

from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory


# TODO: This is an integration test, try to make it less so and more of a unit-test.
@override_settings(
COMPREHENSIVE_THEME_DIRS=['/edx/src/themes'],
COMPREHENSIVE_THEME_DIRS=[settings.REPO_ROOT / 'common/test/appsembler'],
ENABLE_COMPREHENSIVE_THEMING=True,
DEFAULT_SITE_THEME='edx-theme-codebase',
)
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/appsembler.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requests==2.9.1
django-anymail==5.0
django-tiers==0.0.20
dj-database-url==0.4.2
psycopg2==2.8.3
psycopg2-binary==2.8.3

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melvinsoft what do you think of this switch for edx-platform? We've been using this for AMC for a while, but perhaps you have another opinion.

BTW, without this library it's very painful to run tox outside Docker.

django-compat==1.0.14
django-hijack==2.1.4
django-hijack-admin==2.1.4
41 changes: 34 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,35}-django{18,19,110,111}
envlist = py27-{paver-pep8,studio,lms},pep8

# This is needed to prevent the lms, cms, and openedx packages inside the "Open
# edX" package (defined in setup.py) from getting installed into site-packages
Expand Down Expand Up @@ -45,12 +45,9 @@ passenv =
SKIP_NPM_INSTALL
TEST_SUITE
deps =
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10
django110: Django>=1.10,<1.11
django111: Django>=1.11,<2
-r requirements/edx/testing.txt
-r requirements/edx/appsembler.txt
Django>=1.11,<2
-r{toxinidir}/requirements/edx/testing.txt
-r{toxinidir}/requirements/edx/appsembler.txt
whitelist_externals =
/bin/bash
/usr/bin/curl
Expand All @@ -61,6 +58,36 @@ commands =
# Now perform testing.
{posargs}

[testenv:py27-paver-pep8]
commands =
# Upgrade sqlite to fix crashes during testing.
bash scripts/upgrade_pysqlite.sh
paver run_pep8

[testenv:py27-studio]
commands =
# Upgrade sqlite to fix crashes during testing.
bash scripts/upgrade_pysqlite.sh
# Avoid caching edx-platform's entry_points
pip install -r requirements/edx/local.in
pytest cms/djangoapps/contentstore/views/tests/test_assets.py::AssetToJsonTestCase

[testenv:py27-lms]
commands =
# Upgrade sqlite to fix crashes during testing.
bash scripts/upgrade_pysqlite.sh
# Avoid caching edx-platform's entry_points
pip install -r requirements/edx/local.in
pytest \
lms/djangoapps/course_api/ \
lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py \
lms/djangoapps/grades/tests/integration/test_events.py \
lms/djangoapps/instructor/tests/test_certificates.py::CertificatesInstructorApiTest \
openedx/core/djangoapps/appsembler \
openedx/core/djangoapps/site_configuration/tests/test_tahoe_changes.py \
openedx/core/djangoapps/user_api/accounts/tests/test_utils.py::CompletionUtilsTestCase


[testenv:pep8]
deps =
pycodestyle==2.3.1
Expand Down