class MyTest(TestCase):
def setUp(self):
# create tables
def tearDown(self):
# drop tables
Recently (when adding more SQL functions to Piccolo) we added a sub class of TestCase called TableTest, which cuts down the boiler plate of creating / dropping tables.
class MyTest(TableTest): # The parent class creates / drops the tables for us
tables = [MyTable]
We should move some of our existing tests over to use TableTest to remove boiler plate from the code base.
Almost all of our tests are like this:
Recently (when adding more SQL functions to Piccolo) we added a sub class of
TestCase
calledTableTest
, which cuts down the boiler plate of creating / dropping tables.We should move some of our existing tests over to use
TableTest
to remove boiler plate from the code base.