python - django test model field - Stack Overflow
stackoverflow.com › questions › 30575370Jun 01, 2015 · i'm currently writing tests for my django project and i need to make sure. that a specific field of a model is of a certain type. for example in model Pictures i want to make sure that there is a field with the. name "image" and that he of type ImageField. i also want to be able to check if an attribute is of type ForeignKey of . model Pictures.