I am using mysql-server and MySQLdb for accessing my database. I have not even used django models to accessing the database tables.
Now the problem comes while testing. All the django documentation is talking about the testing using django models. While testing a data, i have to insert data into the database using cursor.execute() function then i have to read from that. But this waste out my time.
Also TestCase class run all database query in transaction and my doubt is that, this will be same for mysql-server and myqldb?
I am using MySQLdb since it is faster than django models. Can anyone tell me how can i make the testing simpler ? How can i test the database in django?
setUpandtearDownmethods ofTestCaseclass django-testing-docs.readthedocs.io/en/latest/…? Since you're not using Django models for Create and Update, the statement that django TestCase runs query in transaction does not apply.