diff options
author | Damian Dimmich <damian@tauri-tec.com> | 2014-06-28 20:02:24 +0400 |
---|---|---|
committer | Damian Dimmich <damian@tauri-tec.com> | 2014-06-28 20:02:24 +0400 |
commit | f5092602028386c567cba62bbc857d61eb88133e (patch) | |
tree | 0c378c14e93a69751df1cf6ca1d55aa70c06b42e | |
parent | 01cc8fbacce8f571a47a3617b913e579bd666f97 (diff) | |
download | sqlalchemy-f5092602028386c567cba62bbc857d61eb88133e.tar.gz |
and tests for JSONB - as this is a superset of JSON i've subclassed
the JSON tests as all of these should be applicable as well.
-rw-r--r-- | test/dialect/postgresql/test_types.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index d70a0a52f..b11c2a46c 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -17,7 +17,7 @@ from sqlalchemy import exc, schema, types from sqlalchemy.dialects.postgresql import base as postgresql from sqlalchemy.dialects.postgresql import HSTORE, hstore, array, \ INT4RANGE, INT8RANGE, NUMRANGE, DATERANGE, TSRANGE, TSTZRANGE, \ - JSON + JSON, JSONB import decimal from sqlalchemy import util from sqlalchemy.testing.util import round_decimal @@ -1991,3 +1991,17 @@ class JSONRoundTripTest(fixtures.TablesTest): def test_unicode_round_trip_native(self): engine = testing.db self._test_unicode_round_trip(engine) + +class JSONBTest(JSONTest): + def setup(self): + metadata = MetaData() + self.test_table = Table('test_table', metadata, + Column('id', Integer, primary_key=True), + Column('test_column', JSONB) + ) + self.jsoncol = self.test_table.c.test_column + +class JSONBRoundTripTest(JSONRoundTripTest): + __only_on__ = ('postgresql >= 9.4',) + + |