Vote count:
0
I have model with @classmethod which is performing raw query:
('SELECT * FROM system_data_model, json_array_elements(parent_groups) AS data WHERE "%s" = data::text' % group)
And it works just fine when I opening my webpage which is taking data by that query.
But if I'm doing tests with python manage.py test :
ProgrammingError: function json_array_elements(text) does not exist
LINE 1: SELECT * FROM system_data_model, json_array_elements(parent_g...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Why the query could not work in test?
I've checked version of Postgres, while testing, it's 9.3.
asked 3 mins ago
Postgres function json_array_elements does not found while django's tests
Aucun commentaire:
Enregistrer un commentaire