mirror of
https://github.com/django/django.git
synced 2025-08-09 21:38:18 +00:00
[1.8.x] Fixed #24290 -- Skipped postgres_tests if not running with PostgreSQL.
Backport of 8b39f33d78
from master
This commit is contained in:
parent
730fb593ad
commit
a00a0f8804
5 changed files with 6 additions and 16 deletions
|
@ -1,17 +1,14 @@
|
|||
import json
|
||||
import unittest
|
||||
|
||||
from django.contrib.postgres import forms
|
||||
from django.contrib.postgres.fields import HStoreField
|
||||
from django.contrib.postgres.validators import KeysValidator
|
||||
from django.core import exceptions, serializers
|
||||
from django.db import connection
|
||||
from django.test import TestCase
|
||||
|
||||
from .models import HStoreModel
|
||||
|
||||
|
||||
@unittest.skipUnless(connection.vendor == 'postgresql', 'PostgreSQL required')
|
||||
class SimpleTests(TestCase):
|
||||
apps = ['django.contrib.postgres']
|
||||
|
||||
|
@ -36,7 +33,6 @@ class SimpleTests(TestCase):
|
|||
self.assertEqual(reloaded.field, value)
|
||||
|
||||
|
||||
@unittest.skipUnless(connection.vendor == 'postgresql', 'PostgreSQL required')
|
||||
class TestQuerying(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
@ -115,7 +111,6 @@ class TestQuerying(TestCase):
|
|||
)
|
||||
|
||||
|
||||
@unittest.skipUnless(connection.vendor == 'postgresql', 'PostgreSQL required')
|
||||
class TestSerialization(TestCase):
|
||||
test_data = '[{"fields": {"field": "{\\"a\\": \\"b\\"}"}, "model": "postgres_tests.hstoremodel", "pk": null}]'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue