def test_create(self, Config): config = Mock() Config.return_value = config with patch('catsnap.document.Document._table_name', 'root'): Document.create() config.create_table.assert_called_with('root')