Beispiel #1
0
 def test_price_wrong(self):
     listing = Listing(title = 'testname', price = 'happy')
     b = listing.price == 0
     self.assertEqual(b, False)
Beispiel #2
0
 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')
Beispiel #3
0
 def test_listingname2(self):
     listing = Listing(title = 'item' * 40)
     b = listing.title == 'item'
     self.assertEqual(b, False)
Beispiel #4
0
 def test_not_sold(self):
     listing = Listing(title = 'testname', price = 51.12, condition = 0, description = 'great product', sold = False)
     self.assertEqual(listing.sold, False)
Beispiel #5
0
 def test_description(self):
     listing = Listing(title = 'testname', price = 51.12, condition = 0, description = 'great product')
     self.assertEqual(listing.description, 'great product')
Beispiel #6
0
 def test_good_condition(self):
     listing = Listing(title = 'testname', price = 51.12, condition = 3)
     self.assertEqual(listing.condition, 3)
Beispiel #7
0
 def test_price(self):
     listing = Listing(title = 'testname', price = 51.12)
     self.assertEqual(listing.price, 51.12)
Beispiel #8
0
 def test_listingname(self):
     listing = Listing(title = 'testname')
     self.assertEqual(listing.title, "testname")