Ad
  • Custom User Avatar

    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).

  • Custom User Avatar

    edit: err wait, I bet I mistyped the code
    yeah, my mistake.

    But the problem is still the one I suggested: your code doesn't spot some invalide DateTimeField.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    can you provide the exact assertion/error message? edit: sec...

    int value: None
    field args: {'default': None, 'blank': True, 'min_value': -100, 'max_value': 100}
    result: passes validation method
    test returns: "Validation should have failed"
    

    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. => ?

  • Custom User Avatar

    At this point, I'm not sure if its me not getting the point or if theres an issue with the random tests.

    Meaning you should have opened a Question instead of an Issue.

    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