Tay Ray Chuan committed aa9d80f

tests.db.test_alter_constraints: use skipUnless

Comments (0)

Files changed (1)

+    @skipUnless(db.has_check_constraints, 'Only applies to databases that '
+                                          'support CHECK constraints.')
     def test_alter_constraints(self):
         Tests that going from a PostiveIntegerField to an IntegerField drops
         the constraint on the database.
-        # Only applies to databases that support CHECK constraints
-        if not db.has_check_constraints:
-            return
         # Make the test table
         db.create_table("test_alterc", [
             ('num', models.PositiveIntegerField()),