Skip to content

Commit 33a236d

Browse files
committed
cleaned up and fixed a bug in Row.__str__
1 parent 2bfd21a commit 33a236d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

source/exercises/oo_intro/report.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, fname, lname, state):
2121
self.state = state
2222

2323
def __str__(self):
24-
return f"| {self.row_id} | {self.fname + ' ' + self.lname:<15} | {self.state} |"
24+
return f"| {self.id} | {self.fname + ' ' + self.lname:<15} | {self.state} |"
2525

2626

2727
class Report:
@@ -72,6 +72,8 @@ def get_paged_rows(self, sort_field, page):
7272
with slicing you'll want to offset your list by 4 in this case
7373
(extra hint: we can define offset as `offset = (page - 1) * self.limit`)
7474
75+
Remember to write tests first! You'll need a few of them to test all the
76+
functionality.
7577
"""
7678
pass
7779

source/exercises/oo_intro/test_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from report import Row, Report
66

77

8-
def example_report(report):
8+
def example_report():
99
"""
1010
utility function to provide a fresh report to test with
1111
"""

0 commit comments

Comments
 (0)