def test_single_product_load(self): l = mongoLoader() product = l.loadProduct(id = 1) self.assertEqual(product['name'], 'loaf of bread')
def test_save_product(self): l = mongoLoader() self.assertTrue(l.saveProduct(id = 2, name = 'bananas'))
def test_product_load(self): l = mongoLoader() products = l.loadProducts() self.assertEqual(products[0]['name'], 'loaf of bread')