def test_add_asn(self):

        data = {
            'asn': 1,
            'name': 'Test ASN #1'
        }

        self.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)
Test adding ASNs to NIPAP.
dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipapbase.py/NipapTest.test_add_asn