Przeglądaj źródła

Renaming and moving files + fixed a bug in Lodel.settings imports

Lodel/sttings/__init__.py wasn't able to import files when called by manage.py
Renaming em to EditorialModel and moved Em* objects to EditorialModel/lib
Adding a first test (that do not pass because of syntax errors in Em* classes)
Yann Weber 9 lat temu
rodzic
commit
8f2a3655bb

+ 0
- 0
EditorialModel/__init__.py Wyświetl plik


+ 0
- 0
EditorialModel/lib/__init__.py Wyświetl plik


em/class.py → EditorialModel/lib/class.py Wyświetl plik


em/component.py → EditorialModel/lib/component.py Wyświetl plik


em/field.py → EditorialModel/lib/field.py Wyświetl plik


em/fieldgroup.py → EditorialModel/lib/fieldgroup.py Wyświetl plik


em/type.py → EditorialModel/lib/type.py Wyświetl plik


+ 9
- 0
EditorialModel/test.py Wyświetl plik

@@ -0,0 +1,9 @@
1
+from django.test import TestCase
2
+from EditorialModel.lib.component import EmComponent
3
+
4
+class ComponentTestCase(TestCase):
5
+    def setup(self):
6
+        testComp = EmComponent(2)
7
+
8
+    def component_instanciate_with_numeric_id(self):
9
+        self.assertEqual(testComp.id, 2)

+ 4
- 4
Lodel/settings/__init__.py Wyświetl plik

@@ -1,13 +1,13 @@
1
-from defaults import *
1
+from Lodel.settings.defaults import *
2 2
 
3 3
 DEBUG = True
4 4
 
5 5
 if DEBUG:
6
-    from dev import *
6
+    from Lodel.settings.dev import *
7 7
 else:
8
-    from production import *
8
+    from Lodel.settings.production import *
9 9
 
10 10
 try:
11
-    from locale import *
11
+    from Lodel.settings.locale import *
12 12
 except ImportError:
13 13
         pass

Loading…
Anuluj
Zapisz