'Make sure bandwidth limit rules are set in low level to ports.
This test is checking applying rules for both possible
directions at once'

def test_port_creation_with_bandwidth_limits_both_directions(self):

    reverse_direction_bw_limit_rule = copy.deepcopy(self.test_bw_limit_rule_1)
    reverse_direction_bw_limit_rule.direction = self.reverse_direction
    self.qos_policies[TEST_POLICY_ID1].rules.append(reverse_direction_bw_limit_rule)
    self.setup_agent_and_ports(port_dicts=self.create_test_ports(amount=1, policy_id=TEST_POLICY_ID1))
    self.wait_until_ports_state(self.ports, up=True)
    for port in self.ports:
        self._assert_bandwidth_limit_rule_is_set(port, self.test_bw_limit_rule_1)
        self._assert_bandwidth_limit_rule_is_set(port, reverse_direction_bw_limit_rule)
