Beispiel #1
0
    def test_get_parents(self):
        """Test get parents"""
        # Setup
        metadata = Mock(spec=Metadata)
        metadata._parent_map = {'test': 'parent_table'}

        # Run
        result = Metadata.get_parents(metadata, 'test')

        # Asserts
        assert result == 'parent_table'
Beispiel #2
0
    def test_get_parents(self):
        """Test get parents"""
        # Run
        metadata = Mock()
        metadata._parent_map = {
            'test': 'parent_table'
        }

        table_name = 'test'

        result = Metadata.get_parents(metadata, table_name)

        # Asserts
        assert result == 'parent_table'