Comment 4 for bug 1386525

Revision history for this message
Eli Qiao (taget-9) wrote :

opps... ignore me, I'v added the code..

I'v add this..
    def test_set_reserve_with_invalid_ip(self):
        # NOTE(maurosr): since this exercises the same code snippet, we do it
        # only for reserve action
        body = {"reserve": "None"}
        # NOTE(eliqiao): in Juno, the exception is NotFound, but in master, we
        # change the error code to BadRequest, both exceptions should be
        # accepted by tempest
        self.assertRaises((exceptions.NotFound, exceptions.BadRequest),
                          self.client.reserve_fixed_ip,
                          "my.invalid.ip", body)