def test_price_wrong(self): listing = Listing(title = 'testname', price = 'happy') b = listing.price == 0 self.assertEqual(b, False)
def test_cateogry_default(self): listing = Listing(title = 'testname', price = 51.12, condition = 0, description = 'great product', sold = False, category = 'OT') self.assertEqual(listing.category, 'OT')
def test_listingname2(self): listing = Listing(title = 'item' * 40) b = listing.title == 'item' self.assertEqual(b, False)
def test_not_sold(self): listing = Listing(title = 'testname', price = 51.12, condition = 0, description = 'great product', sold = False) self.assertEqual(listing.sold, False)
def test_description(self): listing = Listing(title = 'testname', price = 51.12, condition = 0, description = 'great product') self.assertEqual(listing.description, 'great product')
def test_good_condition(self): listing = Listing(title = 'testname', price = 51.12, condition = 3) self.assertEqual(listing.condition, 3)
def test_price(self): listing = Listing(title = 'testname', price = 51.12) self.assertEqual(listing.price, 51.12)
def test_listingname(self): listing = Listing(title = 'testname') self.assertEqual(listing.title, "testname")