BasePostgresTest¶
-
class
tests.test_postgres.BasePostgresTest(methodName='runTest')[source]¶ Shared base class for Postgres tests.
Sets up
ExamplePostgresWrapperinto the attributewrpBefore 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
ExamplePostgresWrapperinstance underwrpfor use by tests
-
wrp: ExamplePostgresWrapper = None¶ Holds a
ExamplePostgresWrapperinstance 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 |