#31221: HStoreField returns str instead of dict during tests.
------------------------------------+--------------------------------------
Reporter: Michael Mulholland | Owner: (none)
Type: Bug | Status: closed
Component: contrib.postgres | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Comment (by Michael Mulholland):
Replying to [comment:3 felixxm]:
> is there any reason to not use `HStoreExtension()` in migrations instead
of a custom `TestRunner`.
Looks like that was my problem. The migrations for the app I work on were
created with {{{makemigrations}}} and the original db user wasn't a
superuser so they couldn't run {{{HStoreExtension}}} (the extension was
being created externally). Upon closer inspection, the only other
operation being run by {{{HStoreExtension}}} is clearing cached hstore
oids. Adding {{{get_hstore_oids.cache_clear()}}} to my testrunner fixes
the issue, though I'll probably just scrap the testrunner and add
{{{HStoreExtension}}}.
--
Ticket URL: <https://code.djangoproject.com/ticket/31221#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.39eff4170cc81e6955e8df6ccf842777%40djangoproject.com.