Commits

Waldemar Kornewald committed 0130b7c

Implemented simple interface for feature support specs

  • Participants
  • Parent commits 285b390

Comments (0)

Files changed (4)

 
 class DatabaseOperations(BaseDatabaseOperations):
     query_backend = 'djangoappengine.db.backend.QueryBackend'
+    distinguish_insert_from_update = False
+    supports_deleting_related_objects = False
+    supports_multi_table_inheritance = False
 
     def quote_name(self, name):
         return name

File db/creation.py

         'SmallIntegerField': 'integer',
         'PositiveIntegerField': 'integer',
         'PositiveSmallIntegerField': 'integer',
+        'BigIntegerField':   'long',
         'AutoField':         'integer',
         'OneToOneField':     'integer',
         'DecimalField':      'decimal',

File tests/__init__.py

+from .backend import BackendTest
 from .field_db_conversion import FieldDBConversionTest
 from .field_options import FieldOptionsTest
 from .filter import FilterTest

File tests/backend.py

+from django.db import models
+from django.test import TestCase
+
+class BackendTest(TestCase):
+    def test_multi_table_inheritance(self):
+        class A(models.Model):
+            value = models.IntegerField()
+        class B(A):
+            value2 = models.IntegerField()
+        self.assertRaises(ValueError, B.objects.count)
+        self.assertRaises(ValueError, B.objects.all().get)
+        self.assertRaises(ValueError, lambda: B.objects.all()[:10][0])
+        self.assertRaises(ValueError, B(value=1, value2=2).save)
+
+        class AbstractB(A):
+            value2 = models.IntegerField()
+            class Meta:
+                abstract = True
+
+        class C(B):
+            value3 = models.IntegerField()
+        self.assertRaises(ValueError, C(value=1, value2=2, value3=3).save)