Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[HOT-FIX] correct isort;
  • Loading branch information
opalczynski committed Sep 27, 2016
commit 20d6d79710c3905d5e4f353eedc5f552dc60b12b
10 changes: 6 additions & 4 deletions tests/integration_test_data_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_manager_update(self):
# update also a file;
new_update_string = 'manager with file update'
file_content = 'manager file update'
new_file = StringIO()
new_file = StringIO(file_content)
Object.please.update(
id=data_object.id,
class_name=self.class_name,
Expand Down Expand Up @@ -117,9 +117,11 @@ def test_manager_create(self):
self.assert_file_md5(data_object)

@classmethod
def get_file_md5(cls, file_content):
if isinstance(file_content, six.string_types):
file_content = file_content.encode('utf-8')
def get_file_md5(cls, file_object):
if isinstance(file_object, six.string_types):
file_content = file_object.encode('utf-8')
else:
file_content = file_object.read()
return md5(file_content).hexdigest()

def assert_file_md5(self, data_object):
Expand Down