Пример #1
0
class TestGoods( unittest.TestCase ):

    def setUp( self ):
        self.name = "PEPSI"
        self.price = 20

        self.my_goods = Goods( self.name, self.price );

    def test_object( self ):
        self.assertIsNotNone( self.my_goods )
        self.assertEqual( self.my_goods.name(), self.name )
        self.assertEqual( self.my_goods.price(), self.price )
Пример #2
0
    def setUp( self ):
        self.name = "PEPSI"
        self.price = 20

        self.my_goods = Goods( self.name, self.price );