class MyTest(unittest.TestCase):

    def setUp(self):
        connection.cursor().execute('CREATE TABLE ...')

def tearDown(self):
    connection.cursor().execute('DROP TABLE ...')
How to create table during Django tests with managed = False