Skip to content

Fix introspection of list field in schema - #5326

Merged
carltongibson merged 2 commits into
encode:masterfrom
limdauto:limdauto-patch-1
Aug 21, 2017
Merged

carltongibson merged 2 commits into
encode:masterfrom
limdauto:limdauto-patch-1

Conversation

@limdauto

Copy link
Copy Markdown
Contributor

I hope the commit is self-explanatory. Please let me know if you need more information.

@carltongibson

Copy link
Copy Markdown
Collaborator

@limdauto I think we need a test case to cover the intended behaviour here. (Not least because we want to avoid regressions as the schema generation code grows/matures.)

@limdauto

limdauto commented Aug 17, 2017 •

Copy link
Copy Markdown
Contributor Author

@carltongibson hi thanks for the feedback I have just realized that this fixes a known issue: #5311 i will add a test case this weekend.

@carltongibson

Copy link
Copy Markdown
Collaborator

@limdauto Awesome. Thanks!

@limdauto

Copy link
Copy Markdown
Contributor Author

@carltongibson sorry I was moving house last week so only got a chance to do it now. I have added a test.

As a general question, the test suite for schema generation seems to be all integration test, i.e. we need to make a call to the API and get back the schema to check for validity. So it takes a bit of extra effort to test smaller fixes like this. What's your opinion of introducing more unit tests to some lower-level methods?

@carltongibson

Copy link
Copy Markdown
Collaborator

What's your opinion of introducing more unit tests to some lower-level methods?

I all for that!

Aside: this is all still new. First batch of tests are deliberately high-level: "Does it all work?". As it matures, yes, we need to move to more targeted testing.

@carltongibson carltongibson added this to the 3.6.4 Release milestone Aug 21, 2017

@carltongibson carltongibson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely. Thank you very much!

@carltongibson
carltongibson merged commit d2286ba into encode:master Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants