

def test_availability(self):
    a = get_availability('5769326')
    self.assertEqual(a['wrlc'], '5769326')
    self.assertEqual(len(a['offers']), 1)
    o = a['offers'][0]
    self.assertEqual(o['@type'], 'Offer')
    self.assertEqual(o['seller'], 'George Washington')
    self.assertEqual(o['availabilityAtOrFrom'].lower(), 'gelman stacks')
    self.assertEqual(o['sku'], 'PR6019.O9 F5 1999')
    self.assertTrue((o['availability'] in availability))
    self.assertEqual(o['serialNumber'], '3927007')
    self.assertTrue(o['description'])

dataset/ETHPy150Open gwu-libraries/launchpad/lp/ui/dbtest.py DbTests.test_availability/original