def test_default(self):
        # Test passing in a full set of parameters to 'default'
        # Some parameters may be not set: None
        for ip_dest in IP_DESTS:
            (next_hop, next_hop_ip) = choice(NEXT_HOPS)
            distance = choice(DISTANCES)
            if distance:
                distance = random_int(0, 255)
            tag = choice(TAGS)
            if tag:
                tag = random_int(0, 255)
            route_name = choice(ROUTE_NAMES)
            if route_name:
                route_name = random_string(minchar=4, maxchar=10)

            func = function('default', ip_dest, next_hop,
                            next_hop_ip=next_hop_ip,
                            distance=distance,
                            tag=tag,
                            route_name=route_name)

            # Build the expected string for comparison
            # A value of None will default to an empty string, and
            # add the tag or name keywords where appropriate
            cmd_next_hop_ip = cmd_distance = cmd_tag = cmd_route_name = ''
            if next_hop_ip is not None:
                cmd_next_hop_ip = " %s" % next_hop_ip
            if distance is not None:
                cmd_distance = " %d" % distance
            if tag is not None:
                cmd_tag = " tag %d" % tag
            if route_name is not None:
                cmd_route_name = route_name % " name %s"
            cmds = "default ip route %s %s%s%s%s%s" % \
                   (ip_dest, next_hop, cmd_next_hop_ip, cmd_distance,
                    cmd_tag, cmd_route_name)

            self.eapi_positive_config_test(func, cmds)
dataset/ETHPy150Open arista-eosplus/pyeapi/test/unit/test_api_staticroute.py/TestApiStaticroute.test_default/swapped operands of `%`