Resolve default ordering warnings from tests#3820
Conversation
|
Build failed.
|
3da9991 to
e8a0bf1
Compare
|
Build succeeded.
|
rooftopcellist
left a comment
There was a problem hiding this comment.
Thank you for this! All of the order_by's make sense.
| serializer_class = serializers.UserSerializer | ||
| parent_model = models.Role | ||
| relationship = 'members' | ||
| ordering = ('username',) |
There was a problem hiding this comment.
We could alternatively do this on the model, which would be more concise.
There was a problem hiding this comment.
I agree entirely for the OAuth2 models, because we maintain those. Pushed a commit that does this.
But we don't have a User model inside of our app, so I want to keep these for that model, and only that model.
e8a0bf1 to
a8cce4f
Compare
|
Build succeeded.
|
|
Blocked, as the migration claim is not settled |
|
This is probably unblocked once something like #3842 is merged. |
|
Not blocked anymore 👀 |
a8cce4f to
867cf8d
Compare
|
Build failed.
|
867cf8d to
f4c1884
Compare
|
Build succeeded.
|
|
Got test output, and only remaining warning is: From some googling on this problem, it might be platform-specific, and anyway, it's probably harmless and related to the python stdlib logging. |
|
Build succeeded (gate pipeline).
|
SUMMARY
The tests were giving warnings
There were a lot of them. After this there should be none.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
In some cases, we can't modify the
Metaof the model, because it is not our model.Because of that, I borrowed the closest thing to the standard pattern from DRF:
https://github.com/encode/django-rest-framework/blob/14fad0d6902550cd61fc07370759ef785effa207/rest_framework/filters.py#L186-L190
So when you see the
orderingparameter set on a view, you should know that I did not invent that.