File: django14

package info (click to toggle)
python-django-threadedcomments 0.5.3-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 804 kB
  • sloc: python: 2,521; makefile: 13
file content (65 lines) | stat: -rw-r--r-- 2,662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Description: Fix some incompatibilities with Django 1.4.
# Author: Bernhard Reiter <ockham@raz.or.at>
# Forwarded: https://github.com/ockham/django-threadedcomments/commit/7a9bf0d379d6e874a7a69ffaf8d60f36998a941f

--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -6,11 +6,12 @@
 backup = os.environ.get('DJANGO_SETTINGS_MODULE', '')
 os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
 
-from django.test.simple import run_tests
+from django.test.simple import DjangoTestSuiteRunner
 
 if __name__ == "__main__":
-    failures = run_tests(['threadedcomments',], verbosity=9)
+    runner = DjangoTestSuiteRunner(verbosity=9)
+    failures = runner.run_tests(['threadedcomments',])
     if failures:
         sys.exit(failures)
     # Reset the DJANGO_SETTINGS_MODULE to what it was before running tests.
-    os.environ['DJANGO_SETTINGS_MODULE'] = backup
\ No newline at end of file
+    os.environ['DJANGO_SETTINGS_MODULE'] = backup
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -2,8 +2,12 @@
 
 DEFAULT_CHARSET = 'utf-8'
 
-DATABASE_ENGINE = 'sqlite3'
-DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'threadedcomments_test.db')
+DATABASES = {
+    'default' : {
+        'ENGINE' : 'django.db.backends.sqlite3',
+        'NAME' : os.path.join(os.path.dirname(__file__), 'threadedcomments_test.db'),
+    }
+}
 
 ROOT_URLCONF = 'threadedcomments.urls'
 
--- a/examples/tut1/settings.py
+++ b/examples/tut1/settings.py
@@ -9,12 +9,16 @@
 
 MANAGERS = ADMINS
 
-DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = 'sampledb.db'             # Or path to database file if using sqlite3.
-DATABASE_USER = ''             # Not used with sqlite3.
-DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+DATABASES = {
+    'default' : {
+        'ENGINE' : 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+        'NAME' : 'sampledb.db',                  # Or path to database file if using sqlite3.
+        'USER' : '',             # Not used with sqlite3.
+        'PASSWORD' : '',         # Not used with sqlite3.
+        'HOST' : '',             # Set to empty string for localhost. Not used with sqlite3.
+        'PORT' : '',             # Set to empty string for default. Not used with sqlite3.
+    }
+}
 
 # Local time zone for this installation. Choices can be found here:
 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name