def test_load_int(self): with self.assertRaises(ValueError): f = pybgmax.load(1)
def test_load_path(self): f = pybgmax.load('tests/samples/multipayment.txt') self.assertEquals(f.version, 1) self.assertEquals(len(f.payments), 4)
def test_load_filelike(self): with open('tests/samples/multipayment.txt', 'r') as fp: f = pybgmax.load(fp) self.assertEquals(f.version, 1) self.assertEquals(len(f.payments), 4)