

def test_edit_asn(self):
    ' Test editing ASNs.\n        '
    data = {
        'asn': 3,
        'name': 'Test ASN #3',
    }
    asn = self.nipap.add_asn(asn.auth, data)
    self.nipap.edit_asn(self.auth, data['asn'], {
        'name': 'b0rk',
    })
    self.assertEquals(self.nipap.list_asn(self.auth, {
        'asn': 3,
    })[0]['name'], 'b0rk', "Edited ASN still has it's old name.")
    self.assertRaises(NipapExtraneousInputError, self.nipap.edit_asn, self.auth, {
        'asn': 3,
    }, {
        'asn': 4,
        'name': 'Test ASN #4',
    })

dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipapbase.py NipapTest.test_edit_asn/VarMisuse@36/66 `self`->`asn`