Skip to content

Commit 491d699

Browse files
committed
Added setup.py test support
1 parent 6d94c4d commit 491d699

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ python:
33
- "2.6"
44
- "2.7"
55
- "3.3"
6+
evn:
7+
- DJANGO=1.4
8+
- DJANGO=1.5
69
# command to install dependencies
7-
install: "pip install . --use-mirrors"
10+
install:
11+
- pip install -q Django==$DJANGO --use-mirrors
12+
- pip install -q -e . --use-mirrors"
813
# command to run tests
914
script: python setup.py test

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
url = "https://github.com/burke-software/django-report-builder",
1212
packages=find_packages(),
1313
include_package_data=True,
14+
test_suite='setuptest.setuptest.SetupTestSuite',
15+
tests_require=(
16+
'django-setuptest',
17+
),
1418
classifiers=[
1519
"Development Status :: 5 - Production/Stable",
1620
'Environment :: Web Environment',

test_settings.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import os
2+
PROJECT_DIR = os.path.dirname(__file__)
3+
4+
STATIC_URL = PROJECT_DIR + '/static/'
5+
6+
DATABASES = {
7+
'default': {
8+
'ENGINE': 'django.db.backends.sqlite3',
9+
'NAME': 'testdb',
10+
}
11+
}
12+
13+
INSTALLED_APPS = (
14+
'report_builder',
15+
'django.contrib.auth',
16+
'django.contrib.contenttypes',
17+
'django.contrib.sessions',
18+
'django.contrib.sites',
19+
'django.contrib.messages',
20+
'django.contrib.staticfiles',
21+
'django.contrib.admin',
22+
'south',
23+
)
24+
25+
ROOT_URLCONF = "test_urls"

test_urls.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from django.conf.urls import patterns, include, url
2+
3+
# Uncomment the next two lines to enable the admin:
4+
from django.contrib import admin
5+
admin.autodiscover()
6+
7+
urlpatterns = patterns('',
8+
# Examples:
9+
# url(http://github.com/r'^r'^$', 'test_project.views.home', name='home'#39;,%20'test_project.views.home',%20name='home'),
10+
# url(http://github.com/r'^test_project/',%20include('test_project.foo.urls')),
11+
12+
# Uncomment the admin/doc line below to enable admin documentation:
13+
# url(http://github.com/r'^admin/doc/',%20include('django.contrib.admindocs.urls')),
14+
15+
# Uncomment the next line to enable the admin:
16+
url(r'^admin/', include(admin.site.urls)),
17+
url(r'^report_builder/', include('report_builder.urls'))
18+
)

0 commit comments

Comments
 (0)