Skip to content

Commit

Permalink
Add initial tests structure
Browse files Browse the repository at this point in the history
  • Loading branch information
darklow committed Jan 30, 2016
1 parent 8f85cba commit ec6836f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: python
python:
- 2.7
- 3.3
- 3.4
- pypy
env:
- DJANGO=1.9.1
before_install:
- export DJANGO_SETTINGS_MODULE=suit.tests.settings
install:
- pip install -q Django==$DJANGO --use-mirrors
- pip install . --use-mirrors
script:
- django-admin test suit
Empty file added suit/tests/__init__.py
Empty file.
32 changes: 32 additions & 0 deletions suit/tests/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}

INSTALLED_APPS = [
'suit',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sites',
]

MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
# ROOT_URLCONF = 'tests.urls'

SITE_ID = 1
SECRET_KEY = 'secret-key'

# ROOT_URLCONF = 'tests.urls'
# STATIC_URL = '/site_media/static/'
13 changes: 13 additions & 0 deletions suit/tests/test_menu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from django.test import TestCase
from suit.menu import ParentItem


class TestMenuTestCase(TestCase):
def setUp(self):
pass

def test_method(self):
"""
Just a dummy test case to satisfy Travis until all the tests are finished
"""
self.assertEqual(ParentItem(app='abc')._key(), 'abc')

0 comments on commit ec6836f

Please sign in to comment.