diff --git a/runtests.py b/runtests.py old mode 100644 new mode 100755 index 6c186bb..a6a917e --- a/runtests.py +++ b/runtests.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- import os, sys diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 25a2bae..1e11a8e --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from setuptools import setup, find_packages description=""" diff --git a/tests/pg_json_fields/tests.py b/tests/pg_json_fields/tests.py index fb8f31c..04fb139 100644 --- a/tests/pg_json_fields/tests.py +++ b/tests/pg_json_fields/tests.py @@ -64,6 +64,11 @@ def test_primitives_null(self): obj = self.model_class.objects.get(pk=obj.pk) self.assertEqual(obj.data, None) + def test_dict_with_int_key(self): + obj = self.model_class.objects.create(data={10: 5}) + obj = self.model_class.objects.get(pk=obj.pk) + self.assertDictEqual(obj.data, {10: 5}) + def test_value_to_string_serializes_correctly(self): obj = self.model_class.objects.create(data={"a": 1})