def test_format_returns_the_first_item_for_a_list_with_one_item(self): self.fixture['supportedDevices'] = ['PC'] attribute = Attribute('supportedDevices', self.fixture) self.assertEqual(attribute.format(["PC"]), "PC")
def test_format_returns_no_for_true_boolean(self): attribute = Attribute('supportAvailability', self.fixture) self.assertEqual(attribute.format(False), 'No')
def test_format_returns_empty_string_for_a_empty_list(self): self.fixture['supportedDevices'] = [] attribute = Attribute('supportedDevices', self.fixture) self.assertEqual(attribute.format([]), "")
def test_format_returns_yes_for_true_boolean(self): attribute = Attribute('supportAvailability', self.fixture) self.assertEqual(attribute.format(True), 'Yes')