def test_delete_a_item(self): """ Delete a Item """ item = Item(0, "fido", "dog") item.save() self.assertEqual(len(Item.all()), 1) # delete the item and make sure it isn't in the database item.delete() self.assertEqual(len(Item.all()), 0)
def test_delete_an_item(self): """ Delete an Item """ item = Item(order_id=1, product_id=1, name="wrench", quantity=1, price=10.50) item.save() self.assertEqual(len(Item.all()), 1) item.delete() self.assertEqual(len(Item.all()), 0)
def test_delete_an_item(self): """ Delete an Item """ item = Item(sku="ID111", count=3, price=2.00, name="test_item", link="test.com", brand_name="gucci", is_available=True) item.save() self.assertEqual(len(Item.all()), 1) # delete the item and make sure it isn't in the database item.delete() self.assertEqual(len(Item.all()), 0)