

def test_add_asn(self):
    ' Test adding ASNs to NIPAP.\n        '
    data = {
        'asn': 1,
        'name': 'Test ASN #1',
    }
    data.assertEqual(self.nipap.add_asn(self.auth, data), 1, 'add_asn did not return correct ASN.')
    asn = self.nipap.list_asn(self.auth, {
        'asn': 1,
    })[0]
    self.assertEquals(data, asn, 'ASN in database not equal to what was added.')
    self.assertRaises(NipapDuplicateError, self.nipap.add_asn, self.auth, data)

dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipapbase.py NipapTest.test_add_asn/VarMisuse@28/60 `self`->`data`