def test_2_components_find_connections(): palette = Palette(one=Sample1, two=Sample2) connections = { "one": {"deposition__rate": ["two"]}, "two": {"air__temperature": ["one"], "surface__elevation": ["one"]}, } assert connections == palette.find_connections()
def test_2_components_find_connections(): palette = Palette(one=Sample1, two=Sample2) connections = { 'one': {'deposition__rate': ['two']}, 'two': {'air__temperature': ['one'], 'surface__elevation': ['one']}, } assert_dict_equal(connections, palette.find_connections())
def test_find_connections(self): palette = Palette(one=Sample1, two=Sample2) connections = { 'one': {'deposition__rate': ['two']}, 'two': {'air__temperature': ['one'], 'surface__elevation': ['one']}, } self.assertDictEqual(connections, palette.find_connections())
def test_find_connections(self): palette = Palette(one=Sample1, two=Sample2) connections = { 'one': { 'deposition__rate': ['two'] }, 'two': { 'air__temperature': ['one'], 'surface__elevation': ['one'] }, } self.assertDictEqual(connections, palette.find_connections())
def test_2_components_find_connections(): palette = Palette(one=Sample1, two=Sample2) connections = { "one": { "deposition__rate": ["two"] }, "two": { "air__temperature": ["one"], "surface__elevation": ["one"] }, } assert connections == palette.find_connections()
def test_empty_palette(): """Create a palette without components.""" palette = Palette() assert len(palette) == 0 assert list(palette.list()) == [] assert list(palette.keys()) == [] assert palette.uses() == [] assert palette.provides() == [] providers = palette.find_provider("air__temperature") assert providers == [] users = palette.find_user("air__temperature") assert users == [] connections = palette.find_connections() assert connections == {}
def test_empty_palette(): """Create a palette without components.""" palette = Palette() assert_equal(len(palette), 0) assert_equal(list(palette.list()), []) assert_equal(list(palette.keys()), []) assert_equal(palette.uses(), []) assert_equal(palette.provides(), []) providers = palette.find_provider('air__temperature') assert_equal(providers, []) users = palette.find_user('air__temperature') assert_equal(users, []) connections = palette.find_connections() assert_dict_equal(connections, {})
def test_find_connections(self): palette = Palette(sample=Sample1) with self.assertRaises(NoProvidersError): connections = palette.find_connections()
def test_1_component_find_connections(): palette = Palette(sample=Sample1) with pytest.raises(NoProvidersError): palette.find_connections()