Ejemplo n.º 1
0
 def test_example(self):
     # In this pattern, we want to check a sequence is
     # of the correct type and order.
     r = a_function()
     self.assertEqual(r, (
         C('testfixtures.tests.sample1.TestClassA'),
         C('testfixtures.tests.sample1.TestClassB'),
         C('testfixtures.tests.sample1.TestClassA'),
         ))
     # We also want to check specific parts of some
     # of the returned objects' attributes
     self.assertEqual(r[0].args[0], 1)
     self.assertEqual(r[1].args[0], 2)
     self.assertEqual(r[2].args[0], 3)
Ejemplo n.º 2
0
 def test_example(self):
     # In this pattern, we want to check a sequence is
     # of the correct type and order.
     r = a_function()
     self.assertEqual(r, (
         C('testfixtures.tests.sample1.SampleClassA'),
         C('testfixtures.tests.sample1.SampleClassB'),
         C('testfixtures.tests.sample1.SampleClassA'),
     ))
     # We also want to check specific parts of some
     # of the returned objects' attributes
     self.assertEqual(r[0].args[0], 1)
     self.assertEqual(r[1].args[0], 2)
     self.assertEqual(r[2].args[0], 3)
Ejemplo n.º 3
0
 def test_example(self):
     r = a_function()
     self.assertEqual(r, (C('testfixtures.tests.sample1.TestClassA'), C('testfixtures.tests.sample1.TestClassB'), C('testfixtures.tests.sample1.TestClassA')))
     self.assertEqual(r[0].args[0], 1)
     self.assertEqual(r[1].args[0], 2)
     self.assertEqual(r[2].args[0], 3)