Our current approach of storing metadata on the BaseMockTable class creates potential conflicts with column / field names of the models that we want to test.
What changed
Added a _sql_mock_data class as attribute for BaseMockTable. This is going to be used to store data used for processing
Added a _sql_mock_meta class as attribute for BaseMockTable. This is going to be used to store metadata (e.g. table_reference)
Bonus:
Improved our sql query tests
Added proper docs for ColumnMock class (nullable attribute was missing)
Problem
Our current approach of storing metadata on the
BaseMockTable
class creates potential conflicts with column / field names of the models that we want to test.What changed
_sql_mock_data
class as attribute forBaseMockTable
. This is going to be used to store data used for processing_sql_mock_meta
class as attribute forBaseMockTable
. This is going to be used to store metadata (e.g.table_reference
)nullable
attribute was missing)What to look for