Skip to content

Commit

Permalink
Moved the tests into their own project and make them pass :)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Jun 11, 2009
1 parent 4dfe84d commit cf0bd39
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyc
File renamed without changes.
11 changes: 11 additions & 0 deletions test_project/manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
sys.exit(1)

if __name__ == "__main__":
execute_manager(settings)
Empty file added test_project/polls/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 5 additions & 9 deletions test_utils/tests/settings.py → test_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
DEBUG = False
TEMPLATE_DEBUG = DEBUG

ADMINS = (
# ('Eric', '[email protected]'),
)
ADMINS = ()

MANAGERS = ADMINS

Expand Down Expand Up @@ -62,10 +60,10 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
)

ROOT_URLCONF = 'test.urls'
ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
'/Users/ericholscher/lib/test/templates',
os.path.join(PROJECT_DIR, 'templates')
)

INSTALLED_APPS = (
Expand All @@ -74,8 +72,6 @@
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.admindocs',
'test_utils.tests.polls',
'test_utils',
'django_extensions',
'polls',
'test_app',
)
Empty file.
3 changes: 3 additions & 0 deletions test_project/test_app/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from assertions_tests import *
from templatetags_tests import *
from testmaker_tests import *
from assertions_tests import *

import twill_tests

__test__ = {
'TWILL': twill_tests,
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CrawlerTests(TestCase):
Tests to test the Crawler API
"""
urls = "test_utils.tests.polls.urls"
fixtures = ['/Users/ericholscher/lib/django-test-utils/test_utils/tests/polls/fixtures/polls_testmaker.json']
fixtures = ['polls_testmaker.json']

def test_basic_crawling(self):
conf_urls = {}
Expand All @@ -29,7 +29,7 @@ class TestMakerTests(TestCase):
Tests to test basic testmaker functionality.
"""
urls = "test_utils.tests.polls.urls"
fixtures = ['/Users/ericholscher/lib/django-test-utils/test_utils/tests/polls/fixtures/polls_testmaker.json']
fixtures = ['polls_testmaker.json']

def setUp(self):
setup_logging('test_file', 'serialize_file')
Expand Down
File renamed without changes.

0 comments on commit cf0bd39

Please sign in to comment.