Mixer generate a number higher then MaxValueValidator
- Dominant language
- Python
- Stars
- 953
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
hi @klen I am having an error with my model when I use as a constraint Min/MaxValueValidator.
```
from django.core.validators import MinValueValidator, MaxValueValidator
class Course(models.Model):
number_of_minutes = models.PositiveIntegerField(
validators=[
MinValueValidator(12),
MaxValueValidator(60)
]
)
```
in the shell
```
course = mixer.blend(Course)
course.number_of_minutes
=> 5645
```
So I want to know how to have the MaxValueValidator constraint
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue in the Django shell with the shown Course model and Mixer call. Trace how Mixer generates values for Django model fields with MinValueValidator and MaxValueValidator; done means generated number_of_minutes values stay between 12 and 60.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100