Practice · 2 of 2
Fixture Discipline
CHALLENGE
Difficulty: intermediate+25 XP
Implement class Cart with add(item, price) and total(). Then write TestCart whose setUp creates a fresh self.cart with one item ('tea', 3) and whose tests add more and assert totals. Assign the class to SUITE_TEST.
Press Submit to check your solution.
Back to lesson: Practice: unittest Drills