mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-07 10:41:56 +00:00
r cleanup
This commit is contained in:
parent
a810814a32
commit
c61cc3e39d
@ -6,27 +6,23 @@ from approvaltests.approvals import verify
|
||||
|
||||
|
||||
class GildedRoseTest(unittest.TestCase):
|
||||
def do_stuff(self, item):
|
||||
thing = Item(item[0], item[1], item[2])
|
||||
gilded_rose = GildedRose([thing])
|
||||
gilded_rose.update_quality()
|
||||
result = str(thing)
|
||||
return result
|
||||
|
||||
def test_foo(self):
|
||||
inputs = [
|
||||
Item("foo", 0, 0),
|
||||
Item("Aged Brie", 0, 0),
|
||||
Item("Backstage passes to a TAFKAL80ETC concert", 0, 0),
|
||||
]
|
||||
input_Vals = [
|
||||
("foo", 0, 0),
|
||||
("Aged Brie", 0, 0),
|
||||
("Backstage passes to a TAFKAL80ETC concert", 0, 0),
|
||||
]
|
||||
output_items = deepcopy(inputs)
|
||||
gilded_rose = GildedRose(output_items)
|
||||
gilded_rose.update_quality()
|
||||
|
||||
to_approve = []
|
||||
for item in input_Vals:
|
||||
thing = Item(item[0], item[1], item[2])
|
||||
gilded_rose = GildedRose([thing])
|
||||
gilded_rose.update_quality()
|
||||
to_approve.append(str(thing))
|
||||
to_approve.append(self.do_stuff(item))
|
||||
|
||||
verify("\n".join(to_approve))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user