BasePostgresTest¶
-
class
tests.test_postgres.
BasePostgresTest
(methodName='runTest')[source]¶ Shared base class for Postgres tests.
Sets up
ExamplePostgresWrapper
into the attributewrp
Before each test (
setUp()
) it deletes and recreates the tables to avoid leftover tables/rowsAfter each test (
tearDown()
) it drops all tables to ensure no leftover tables once the tests are done.
-
__init__
(methodName='runTest') Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
-
conn
= None¶ Holds the module’s Postgres connection
-
classmethod
setUpClass
()[source]¶ Sets up a
ExamplePostgresWrapper
instance underwrp
for use by tests
-
wrp
= None¶ Holds a
ExamplePostgresWrapper
instance for use by test cases
Methods¶
Methods
|
Deletes and recreates all tables to avoid leftover tables/rows |
Sets up a |
|
|
Deletes all tables after each test finises to avoid leftover tables/rows |