1π
β
I could bring the test to fail in exactly the same way, if I post an invalid choice. Posting Bronze passes the test, but I have the choices hardcoded in the form
class and donβt fetch them dynamically from the database.
Makes me think if the plans exist in the database of the unit test (or in a mocked queryset
) so that they are fetched correctly from Plan.objects.get_choices()
?
π€sthzg
Source:stackexchange.com