Skip to content

Commit

Permalink
fix flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Sep 15, 2016
1 parent a7870f0 commit 6b68313
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/test_django_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def test_load_and_format_sheet_from_django_model(self):
file_type=DB_DJANGO)
assert model.objects.objs == self.result
model._meta.update(["X", "Y", "Z"])

def row_renderer(row):
return [str(element) for element in row]
# the key point of this test case
Expand Down
6 changes: 4 additions & 2 deletions tests/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ def setUp(self):
save_data(self.test_file, sample)

def test_filter_row(self):

def custom_row_renderer(row):
return [str(element) for element in row]
custom_data = get_data(self.test_file, row_renderer=custom_row_renderer)
custom_data = get_data(self.test_file,
row_renderer=custom_row_renderer)
expected = [['1', '21', '31'], ['2', '22', '32']]
eq_(custom_data[self.test_file], expected)

def tearDown(self):
os.unlink(self.test_file)
os.unlink(self.test_file)
1 change: 1 addition & 0 deletions tests/test_sql_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def test_sql(self):

def test_sql_formating(self):
mysession = Session()

def custom_renderer(row):
return [str(element) for element in row]
# the key for this test case
Expand Down

0 comments on commit 6b68313

Please sign in to comment.