def test_add_tags_validation(self):
        right_tags = ['1', 'a', 'a_1', 'a.2', 'a.A', 'a-A']
        wrong_tags = ['a.', '_a', 'a..a']
        wrong_symbols = "!@#$%^&*,"

        data = {
            'tags': []
        }
        for tag in right_tags:
            data["tags"] = [tag]
            self._assert_create_object_validation(
                data=data)
        for tag in wrong_tags:
            data["tags"] = [tag]
            self._assert_create_object_validation(
                data=data,
                bad_req_i=(1, 'VALIDATION_ERROR',
                           tag % u"tags[0]: '%s' is not a 'valid_tag'"))
        for symb in wrong_symbols:
            tag = "a%sa" % symb
            data['tags'] = [tag]
            self._assert_create_object_validation(
                data=data,
                bad_req_i=(1, 'VALIDATION_ERROR',
                           u"tags[0]: '%s' is not a 'valid_tag'" % tag))
dataset/ETHPy150Open openstack/sahara/sahara/tests/unit/service/validation/test_add_tags_validation.py/TestTagsAddingValidation.test_add_tags_validation/swapped operands of `%`