def test_get_initial_g_per_cig_g(self): """test PackManager.get_g_per_cig method when create new pack & if type_cig == 'ROL'""" datas ={ 'type_cig':'ROL', 'brand':'1637', 'qt_paquet':30, 'price':11, } pack = PackManager(self.usertest, datas) self.assertEqual(pack.get_g_per_cig(), 0.8) self.assertEqual(pack.g_per_cig, 0.8)
def test_get_initial_g_per_cig_u(self): """test PackManager.get_g_per_cig method when create new pack & if type_cig == 'IND'""" datas ={ 'type_cig':'IND', 'brand':'Camel', 'qt_paquet':20, 'price':10, } pack = PackManager(self.usertest, datas) self.assertEqual(pack.get_g_per_cig(), None) self.assertEqual(pack.g_per_cig, None)