-
Notifications
You must be signed in to change notification settings - Fork 30
INTPYTHON-483 Add querying support for EmbeddedModelArrayField #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fc53f56 to
c446c49
Compare
9850b66 to
f50337f
Compare
41f1843 to
ca7a7b3
Compare
744a9ef to
f6625d9
Compare
b4e627e to
e40bea8
Compare
26b63d9 to
c97ef18
Compare
4e5e57c to
5e66c91
Compare
Otherwise, they collide with django.contrib.postgres's ArrayField.
5e66c91 to
13efcd1
Compare
| def test_invalid_lookup(self): | ||
| msg = "Unsupported lookup 'return' for EmbeddedModelArrayField of 'IntegerField'" | ||
| with self.assertRaisesMessage(FieldDoesNotExist, msg): | ||
| Exhibit.objects.filter(sections__section_number__return=3) | ||
|
|
||
| def test_invalid_operation(self): | ||
| msg = "Unsupported lookup 'rage' for EmbeddedModelArrayField of 'IntegerField'" | ||
| with self.assertRaisesMessage(FieldDoesNotExist, msg): | ||
| Exhibit.objects.filter(sections__section_number__rage=[10]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the second test redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to test range, given that range is a numerical operation but isn't allowed in EmbeddedModelArrayField. So, It was a test to prove the lookups are only the allowed by the scalar type (in this case numeric) and the allowed by the EMAF. But Rage does not exist in both, there are other test with range but was over json
(initial review comments at timgraham#9)