Skip to content

Commit

Permalink
Add failing test for #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexei Boronine authored and Andrey Antukh committed Jun 24, 2013
1 parent 76e2209 commit 47f582d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions djorm_hstore/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.db import connections
from django.db.models.aggregates import Count
from django.utils.unittest import TestCase
from django.core import serializers

from ..functions import HstoreKeys, HstoreSlice, HstorePeek
from ..expressions import HstoreExpression
Expand Down Expand Up @@ -291,6 +292,12 @@ def test_empty_querying(self):
self.assertTrue(DataBag.objects.filter(data={}))
self.assertTrue(DataBag.objects.where(HstoreExpression("data").contains({})))

def test_serialize_deserialize(self):
bag = DataBag.objects.create(name='bag')
s = serializers.serialize('json', [bag])
for b in serializers.deserialize('json', s):
self.assertEqual(b.__class__, DataBag)


class TestReferencesField(TestCase):
def setUp(self):
Expand Down

0 comments on commit 47f582d

Please sign in to comment.