This repository has been archived by the owner on Oct 18, 2022. It is now read-only.
forked from denisenkom/django-sqlserver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdjango1.9.12-patch.txt
80 lines (68 loc) · 3.29 KB
/
django1.9.12-patch.txt
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py
index 7053aca..60a702f 100644
--- a/tests/aggregation/tests.py
+++ b/tests/aggregation/tests.py
@@ -16,6 +16,7 @@ from django.utils import six, timezone
from django.utils.deprecation import RemovedInDjango110Warning
from .models import Author, Book, Publisher, Store
+import unittest
class AggregateTestCase(TestCase):
@@ -1163,6 +1164,7 @@ class AggregateTestCase(TestCase):
max_books_per_rating,
{'books_per_rating__max': 3 + 5})
+ @unittest.skip('doesnt work on MSSQL')
def test_expression_on_aggregation(self):
# Create a plain expression
diff --git a/tests/migrations/test_executor.py b/tests/migrations/test_executor.py
index 1bbed48..c41bb76 100644
--- a/tests/migrations/test_executor.py
+++ b/tests/migrations/test_executor.py
@@ -6,6 +6,7 @@ from django.db.migrations.graph import MigrationGraph
from django.db.migrations.recorder import MigrationRecorder
from django.db.utils import DatabaseError
from django.test import TestCase, modify_settings, override_settings
+import unittest
from .test_base import MigrationTestBase
@@ -495,6 +496,7 @@ class ExecutorTests(MigrationTestBase):
]
self.assertEqual(call_args_list, expected)
+ @unittest.skip('MSSQL does not allow to alter PK field')
@override_settings(
INSTALLED_APPS=[
"migrations.migrations_test_apps.alter_fk.author_app",
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py
index b624a73..1d11a68 100644
--- a/tests/migrations/test_operations.py
+++ b/tests/migrations/test_operations.py
@@ -760,6 +760,7 @@ class OperationTests(OperationTestBase):
self.assertEqual(pony.digits, "42")
self.assertEqual(pony.quotes, '"\'"')
+ @unittest.skip('this test is currently failing on MSSQL, but it should be possible to fix')
def test_add_binaryfield(self):
"""
Tests the AddField operation on TextField/BinaryField.
@@ -1104,6 +1105,7 @@ class OperationTests(OperationTestBase):
self.assertEqual(definition[1], [])
self.assertEqual(sorted(definition[2]), ["field", "model_name", "name"])
+ @unittest.skip('MSSQL cannot change PK')
def test_alter_field_pk(self):
"""
Tests the AlterField operation on primary keys (for things like PostgreSQL's SERIAL weirdness)
@@ -1122,6 +1124,7 @@ class OperationTests(OperationTestBase):
with connection.schema_editor() as editor:
operation.database_backwards("test_alflpk", editor, new_state, project_state)
+ @unittest.skip('MSSQL cannot change FK automatically')
@skipUnlessDBFeature('supports_foreign_keys')
def test_alter_field_pk_fk(self):
"""
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py
index cc6639b..4cd3693 100644
--- a/tests/model_fields/tests.py
+++ b/tests/model_fields/tests.py
@@ -381,6 +381,7 @@ class DateTimeFieldTests(test.TestCase):
DateTimeModel.objects.create(d=d, dt=dt2, t=t)
self.assertEqual(m, DateTimeModel.objects.get(dt__date=d))
+ @unittest.skip('Currently failing on MSSQL')
@requires_tz_support
@test.skipUnlessDBFeature('has_zoneinfo_database')
@test.override_settings(USE_TZ=True, TIME_ZONE='America/Vancouver')