Trying to get a stable dev environment up and running, but can't get the tests to pass.
$ v.mk test_env # Make new virtualenv
$ git clone https://github.com/djangonauts/django-hstore.git
$ cd django-hstore
$ pip install -r requirements.txt
$ pip install Django==1.7
$ python runtests.py
Creating test database for alias 'default'...
.E/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/db/models/base.py:1030: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if f.blank and raw_value in f.empty_values:
/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/db/models/fields/__init__.py:458: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if value in self.empty_values:
EE..E...........E...E.......EE.E.........FE....F........EE..........EF...FE....F...F./Users/anthony/Projects/test/django-hstore/django_hstore/query.py:57: RemovedInDjango18Warning: 'is_managed' is deprecated.
if not transaction.is_managed(using=self.db):
F.......EE.........EF......F.FF
======================================================================
ERROR: test_admin_add (tests.django_hstore_tests.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 718, in test_admin_add
self.assertEqual(d.number, 3)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/virtual.py", line 49, in __get__
return getattr(instance, self.hstore_field_name).get(self.name, self.default)
AttributeError: 'str' object has no attribute 'get'
======================================================================
ERROR: test_admin_add_utf8 (tests.django_hstore_tests.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 730, in test_admin_add_utf8
self.assertEqual(d.number, 3)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/virtual.py", line 49, in __get__
return getattr(instance, self.hstore_field_name).get(self.name, self.default)
AttributeError: 'str' object has no attribute 'get'
======================================================================
ERROR: test_admin_change (tests.django_hstore_tests.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 741, in test_admin_change
response = self.client.get(url)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/test/client.py", line 467, in get
**extra)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/test/client.py", line 285, in get
return self.generic('GET', path, secure=secure, **r)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/test/client.py", line 355, in generic
return self.request(**r)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/test/client.py", line 437, in request
six.reraise(*exc_info)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/contrib/admin/options.py", line 567, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/utils/decorators.py", line 105, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/views/decorators/cache.py", line 52, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 204, in inner
return view(request, *args, **kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1440, in change_view
return self.changeform_view(request, object_id, form_url, extra_context)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper
return bound_func(*args, **kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/utils/decorators.py", line 105, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func
return func.__get__(self, type(self))(*args2, **kwargs2)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/db/transaction.py", line 394, in inner
return func(*args, **kwargs)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1403, in changeform_view
form = ModelForm(instance=obj)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/forms/models.py", line 319, in __init__
object_data = model_to_dict(instance, opts.fields, opts.exclude)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/forms/models.py", line 151, in model_to_dict
data[f.name] = f.value_from_object(instance)
File "/Users/anthony/.virtualenvs/test/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 848, in value_from_object
return getattr(obj, self.attname)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/virtual.py", line 49, in __get__
return getattr(instance, self.hstore_field_name).get(self.name, self.default)
AttributeError: 'str' object has no attribute 'get'
======================================================================
ERROR: test_create (tests.django_hstore_tests.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 844, in test_create
self.assertEqual(s1.number, 2)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/virtual.py", line 49, in __get__
return getattr(instance, self.hstore_field_name).get(self.name, self.default)
AttributeError: 'str' object has no attribute 'get'
======================================================================
ERROR: test_schemadatabag_save (tests.django_hstore_tests.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 680, in test_schemadatabag_save
self.assertEqual(d.number, 4)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/virtual.py", line 49, in __get__
return getattr(instance, self.hstore_field_name).get(self.name, self.default)
AttributeError: 'str' object has no attribute 'get'
======================================================================
ERROR: test_utf8 (tests.django_hstore_tests.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 821, in test_utf8
self.assertEqual(d.char, u'è')
File "/Users/anthony/Projects/test/django-hstore/django_hstore/virtual.py", line 49, in __get__
return getattr(instance, self.hstore_field_name).get(self.name, self.default)
AttributeError: 'str' object has no attribute 'get'
======================================================================
ERROR: test_boolean (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 110, in test_boolean
self.assertEqual(json.loads(databag.data['boolean']), True)
TypeError: string indices must be integers, not str
======================================================================
ERROR: test_decimal (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 62, in test_decimal
self.assertEqual(databag.data['dec'], force_text(Decimal('1.01')))
TypeError: string indices must be integers, not str
======================================================================
ERROR: test_dictionary (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 101, in test_dictionary
self.assertEqual(json.loads(databag.data['dict']), {'subkey': 'subvalue'})
TypeError: string indices must be integers, not str
======================================================================
ERROR: test_hslice (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 405, in test_hslice
self.assertEqual(DataBag.objects.hslice(id=alpha.id, attr='data', keys=['v']), {'v': '1'})
File "/Users/anthony/Projects/test/django-hstore/django_hstore/managers.py", line 33, in hslice
return self.filter(**params).hslice(attr, keys)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/query.py", line 46, in selector
return method(self, query, *args, **params)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/query.py", line 294, in hslice
return dict((key, field._value_to_python(value)) for key, value in result[0].items())
AttributeError: 'str' object has no attribute 'items'
======================================================================
ERROR: test_list (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 96, in test_list
self.assertEqual(json.loads(databag.data['list']), ['a', 'b', 'c'])
TypeError: string indices must be integers, not str
======================================================================
ERROR: test_long (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 76, in test_long
self.assertEqual(databag.data['long'], force_text(l))
TypeError: string indices must be integers, not str
======================================================================
ERROR: test_number (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 88, in test_number
self.assertEqual(databag.data['num'], '1')
TypeError: string indices must be integers, not str
======================================================================
ERROR: test_serialization_deserialization (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 430, in test_serialization_deserialization
self.assertEqual(json.loads(str(DataBag.objects.get(name='alpha').data)), json.loads(str(alpha.data)))
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 368, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 1 column 4 - line 1 column 20 (char 3 - 19)
======================================================================
ERROR: test_hremove (tests.django_hstore_tests.tests.TestReferencesField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 1057, in test_hremove
self.assertEqual(RefsBag.objects.get(name='alpha').refs['0'], alpha.refs['0'])
File "/Users/anthony/Projects/test/django-hstore/django_hstore/dict.py", line 149, in __getitem__
value = super(self.__class__, self).__getitem__(*args, **kwargs)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/dict.py", line 73, in __getitem__
value = super(HStoreDict, self).__getitem__(*args, **kwargs)
KeyError: '0'
======================================================================
ERROR: test_hslice (tests.django_hstore_tests.tests.TestReferencesField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 1071, in test_hslice
self.assertEqual(RefsBag.objects.hslice(id=alpha.id, attr='refs', keys=['0']), {'0': refs[0]})
File "/Users/anthony/Projects/test/django-hstore/django_hstore/managers.py", line 33, in hslice
return self.filter(**params).hslice(attr, keys)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/query.py", line 46, in selector
return method(self, query, *args, **params)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/query.py", line 294, in hslice
return dict((key, field._value_to_python(value)) for key, value in result[0].items())
AttributeError: 'str' object has no attribute 'items'
======================================================================
ERROR: test_simple_retrieval (tests.django_hstore_tests.tests.TestReferencesField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 995, in test_simple_retrieval
self.assertEqual(Ref.objects.get(name='0'), alpha.refs['0'])
File "/Users/anthony/Projects/test/django-hstore/django_hstore/dict.py", line 149, in __getitem__
value = super(self.__class__, self).__getitem__(*args, **kwargs)
File "/Users/anthony/Projects/test/django-hstore/django_hstore/dict.py", line 73, in __getitem__
value = super(HStoreDict, self).__getitem__(*args, **kwargs)
KeyError: '0'
======================================================================
FAIL: test_hremove (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 395, in test_hremove
self.assertEqual(DataBag.objects.get(name='alpha').data, alpha.data)
AssertionError: '"v"=>"1", "v2"=>"3"' != {'v2': '3', 'v': '1'}
======================================================================
FAIL: test_hupdate (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 411, in test_hupdate
self.assertEqual(DataBag.objects.get(name='alpha').data, alpha.data)
AssertionError: '"v"=>"1", "v2"=>"3"' != {'v2': '3', 'v': '1'}
======================================================================
FAIL: test_properties_hstore (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 589, in test_properties_hstore
self.assertEqual(type(instance.data), HStoreDict)
AssertionError: <type 'str'> != <class 'django_hstore.dict.HStoreDict'>
======================================================================
FAIL: test_replace_full_dictionary (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 229, in test_replace_full_dictionary
self.assertEqual(replacement, DataBag.objects.get(name='foo').data)
AssertionError: {'added': 'new', 'change': 'new value'} != '"added"=>"new", "change"=>"new value"'
======================================================================
FAIL: test_unicode_processing (tests.django_hstore_tests.tests.TestDictionaryField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 207, in test_unicode_processing
self.assertEqual(greets, DataBag.objects.get(name='multilang').data)
AssertionError: {u'en': u'hello, world', u'zh': u'\u4f60\u597d\uff0c\u4e16\u754c', u'de': u'Gr\xfc\xdfe, Welt', u'jp': u'\u3053\u3093\u306b\u3061\u306f\u3001\u4e16\u754c', u'es': u'hola, ma\xf1ana', u'he': u'\u05e9\u05dc\u05d5\u05dd, \u05e2\u05d5\u05dc\u05dd'} != '"de"=>"Gr\xc3\xbc\xc3\x9fe, Welt", "en"=>"hello, world", "es"=>"hola, ma\xc3\xb1ana", "he"=>"\xd7\xa9\xd7\x9c\xd7\x95\xd7\x9d, \xd7\xa2\xd7\x95\xd7\x9c\xd7\x9d", "jp"=>"\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\xe3\x81\xaf\xe3\x80\x81\xe4\xb8\x96\xe7\x95\x8c", "zh"=>"\xe4\xbd\xa0\xe5\xa5\xbd\xef\xbc\x8c\xe4\xb8\x96\xe7\x95\x8c"'
======================================================================
FAIL: test_location_create (tests.django_hstore_tests.tests.TestDictionaryFieldPlusGIS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 1216, in test_location_create
self.assertEqual(other_loc.data, {'prop1': '1', 'prop2': 'test_value'})
AssertionError: '"prop1"=>"1", "prop2"=>"test_value"' != {'prop1': '1', 'prop2': 'test_value'}
======================================================================
FAIL: test_location_hupdate (tests.django_hstore_tests.tests.TestDictionaryFieldPlusGIS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 1222, in test_location_hupdate
self.assertEqual(loc.data, {'prop1': '2', 'prop2': 'test_value'})
AssertionError: '"prop1"=>"2", "prop2"=>"test_value"' != {'prop1': '2', 'prop2': 'test_value'}
======================================================================
FAIL: test_simple_retrieval_get (tests.django_hstore_tests.tests.TestReferencesField)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 1000, in test_simple_retrieval_get
self.assertEqual(Ref.objects.get(name='0'), alpha.refs.get('0'))
AssertionError: <Ref: Ref object> != None
======================================================================
FAIL: test_location_create (tests.django_hstore_tests.tests.TestReferencesFieldPlusGIS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 1248, in test_location_create
self.assertEqual(loc_1.data, {'prop1': '1', 'prop2': 'test_value'})
AssertionError: '"prop1"=>"1", "prop2"=>"test_value"' != {'prop1': '1', 'prop2': 'test_value'}
======================================================================
FAIL: test_location_hupdate (tests.django_hstore_tests.tests.TestReferencesFieldPlusGIS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 1256, in test_location_hupdate
self.assertEqual(loc.data, {'prop1': '2', 'prop2': 'test_value'})
AssertionError: '"prop1"=>"2", "prop2"=>"test_value"' != {'prop1': '2', 'prop2': 'test_value'}
======================================================================
FAIL: test_hstore_registring_in_transaction_block (tests.django_hstore_tests.tests.NotTransactionalTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/anthony/Projects/test/django-hstore/tests/django_hstore_tests/tests.py", line 942, in test_hstore_registring_in_transaction_block
self.assertIsInstance(qs[0].data, HStoreDict)
AssertionError: '"v"=>"1", "v2"=>"3"' is not an instance of <class 'django_hstore.dict.HStoreDict'>
----------------------------------------------------------------------
Ran 118 tests in 2.052s
FAILED (failures=11, errors=17)
Destroying test database for alias 'default'...
This is using Python 2.7.6. Postgres 9.3.4.