Skip to content

Commit

Permalink
Make OFP run against FP tests on top of its own
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Vetter committed Aug 29, 2013
1 parent fced935 commit c21c413
Show file tree
Hide file tree
Showing 19 changed files with 17 additions and 496 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ install:
- pip install . --use-mirrors
- pip install -r requirements.txt --use-mirrors
script:
- py.test tests --pep8 --cov fancypages
- py.test --pep8 --cov --pyargs fancypages -m 'not fp_only'
after_success:
- coveralls
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: docs
.PHONY: docs tests install sandbox

install:
pip install -e . > /dev/null
Expand All @@ -12,3 +12,6 @@ sandbox: install

docs:
$(MAKE) -C docs html

tests:
py.test --pyargs fancypages -m 'not fp_only'
9 changes: 6 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@


location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), x)
sandbox = lambda x: location("sandbox/%s" % x)
sandbox = lambda x: location("oscar_sandbox/%s" % x)


def pytest_configure():
SETTINGS = OSCAR_SETTINGS
SETTINGS.update(FANCYPAGES_SETTINGS)

settings.configure(
DEBUG=True,
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
Expand Down Expand Up @@ -59,7 +60,7 @@ def pytest_configure():
'django.contrib.messages.middleware.MessageMiddleware',
'fancypages.middleware.EditorMiddleware',
),
ROOT_URLCONF='sandbox.sandbox.urls',
ROOT_URLCONF='oscar_sandbox.sandbox.urls',
TEMPLATE_DIRS=[
sandbox('templates'),
OSCAR_MAIN_TEMPLATE_DIR,
Expand All @@ -78,7 +79,8 @@ def pytest_configure():
'twitter_tag',
'sorl.thumbnail',
'rest_framework',
] + ofp_utils.get_oscar_fancypages_apps() + get_core_apps([]),
'django_extensions',
] + ofp_utils.get_oscar_fancypages_apps() + get_core_apps(),
AUTHENTICATION_BACKENDS=(
'django.contrib.auth.backends.ModelBackend',
),
Expand All @@ -89,5 +91,6 @@ def pytest_configure():
},
LOGIN_REDIRECT_URL='/accounts/',
APPEND_SLASH=True,
SITE_ID=1,
**SETTINGS
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
'fancypages.middleware.EditorMiddleware',
)

ROOT_URLCONF = 'sandbox.urls'
ROOT_URLCONF = 'sandbox.ofp_urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'sandbox.wsgi.application'
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions sandbox/sandbox/urls.py → oscar_sandbox/sandbox/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

url(r'^admin/', include(admin.site.urls)),
url(r'', include(shop.urls)),

url(r'', include('oscar_fancypages.urls')),
)

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ pytest-django==2.3.0
pytest-pep8==1.0.4
pytest-sugar==0.2.1

# Browser testing
splinter==0.5.4
virtual-node==0.0.4

# documentation
Sphinx>=1.1.3
docutils>=0.8.1

0 comments on commit c21c413

Please sign in to comment.