Пример #1
0
 def test_load_int(self):
     with self.assertRaises(ValueError):
         f = pybgmax.load(1)
Пример #2
0
    def test_load_path(self):
        f = pybgmax.load('tests/samples/multipayment.txt')

        self.assertEquals(f.version, 1)
        self.assertEquals(len(f.payments), 4)
Пример #3
0
    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)
Пример #4
0
 def test_load_int(self):
     with self.assertRaises(ValueError):
         f = pybgmax.load(1)
Пример #5
0
    def test_load_path(self):
        f = pybgmax.load('tests/samples/multipayment.txt')

        self.assertEquals(f.version, 1)
        self.assertEquals(len(f.payments), 4)
Пример #6
0
    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)