def test_no_tags(self): """Tests calling get_data_type_tags() with no tags""" the_file = ScaleFile() tags = the_file.get_data_type_tags() self.assertSetEqual(tags, set())
def test_tags(self): """Tests calling get_data_type_tags() with tags""" the_file = ScaleFile(data_type='A,B,c') tags = the_file.get_data_type_tags() correct_set = set() correct_set.add('A') correct_set.add('B') correct_set.add('c') self.assertSetEqual(tags, correct_set)
def test_same_tag(self): """Tests calling add_data_type_tag() with the same tag twice""" the_file = ScaleFile() the_file.add_data_type_tag('Hello-1') the_file.add_data_type_tag('Hello-1') tags = the_file.get_data_type_tags() correct_set = set() correct_set.add('Hello-1') self.assertSetEqual(tags, correct_set)
def test_valid(self): """Tests calling add_data_type_tag() with valid tags""" the_file = ScaleFile() the_file.add_data_type_tag('Hello-1') the_file.add_data_type_tag('foo_BAR') tags = the_file.get_data_type_tags() correct_set = set() correct_set.add('Hello-1') correct_set.add('foo_BAR') self.assertSetEqual(tags, correct_set)