Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
removed =>
isinstance
is now allowed.
handled, testing only at Model instantiation time. Oh, I forgot to talk about default taking precedence over auto_now. I'll add that in the next fork.
suppressed the meaningless requirement (and updated the description)
Thanks again for the feedback and the time you spent on this! I did have to check my validation, probably have to refactor it later.
Tests passed! Thanks for modifying the tests! Really helped a lot!
Thanks for looking into it and spending the time! I really appreciate it. I will look into to checking your comment on the DatetimeField.
I updated the tests so that the error message tells what fields are incorrect. Please reset the trainer and reload the page (don't forget to copy your current code first).
I just tried your code: you're actually looking at the wrong field (dunno why). Your code fails on instances where the DateTimeField is wrong, not the IntegerField.
Noted and already done! It failing on the integer field in every case. Since the validation in the User class should have access to both the Integerfield and the data for it, I have checked it more than once.
This is what my logs look like before they fail
'''
'''
Test response in this case with "Validation should have failed" while in previous cases with similiar data of None and fields args, it allows it
note: double check what is the actual field: you don't provide the info, so I bet one case uses an IntegerField while the other is a BooleanField or something else.
"Also, each field type has parameters blank (default False) which determines whether None is allowed as a value, and default (default None) which determines the value to be used if nothing was provided.
Each field type should have its own validate method which checks whether the provided value has the correct type and satisfies the length/value constraints." Kata description
Similar to the Django application, None is allowed is an Integer field, allowed to be able to be modified after instance creation. Validation according to the kata should take place when the validate method is invoked. Additionally, some tests when with None as a value work fine while others dont. Even some values that do have an integer that fullfil the min/max value still fail for some reason.
can you provide the exact assertion/error message?edit: sec...why do you expect this case to be valid? The field is (I guess) supposed to be an IntegerField where None is allowed as default (when creating the field), but None is not an integer so it should still fail at validation time. => ?
From what I can see, the random tests create User instances and run the validation method on the created instance. I think some of the tests assertions might be wrong. All the examples mentioned above are snippets from the random tests failing when running the validation method on the user instance. Some of the results of the random test dont match the kata description.
Meaning you should have opened a
Question
instead of anIssue
.Note that the test configuration isn't enough to sort out your problem, because not every single test is calling the validation function (which is the one that is raising the errors). So I think this is your current problem: are you validating at the right time?
Closing, as "not an issue", but you can keep posting on the thread.
Cheers
Loading more items...