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_users(self): palette = Palette(sample=Sample1) users = palette.find_user('air__temperature') self.assertEqual(users, ['sample'])
def test_find_users(self): palette = Palette(one=Sample1, two=Sample2) users = palette.find_user('air__temperature') self.assertListEqual(['one'], users)
def test_1_component_find_users(): palette = Palette(sample=Sample1) users = palette.find_user('air__temperature') assert_equal(users, ['sample'])
def test_2_components_find_users(): palette = Palette(one=Sample1, two=Sample2) users = palette.find_user('air__temperature') assert_list_equal(['one'], users)
def test_2_components_find_users(): palette = Palette(one=Sample1, two=Sample2) users = palette.find_user("air__temperature") assert ["one"] == users
def test_1_component_find_users(): palette = Palette(sample=Sample1) users = palette.find_user("air__temperature") assert users == ["sample"]