Skip to content

Commit

Permalink
remove test for binary attribute handling
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhochman committed May 13, 2016
1 parent 171d392 commit 3d566a6
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions pynamodb/tests/test_base_connection.py
Expand Up @@ -1714,35 +1714,3 @@ def test_make_api_call_throws_when_retries_exhausted(self, requests_session_mock
self.assertEqual(len(requests_session_mock.mock_calls), 4)
for call in requests_session_mock.mock_calls:
self.assertEqual(call[:2], ('send', (prepared_request,)))

def test_handle_binary_attributes_for_unprocessed_items(self):
binary_blob = six.b('\x00\xFF\x00\xFF')

unprocessed_items = []
for idx in range(0, 5):
unprocessed_items.append({
'PutRequest': {
'Item': {
'name': {STRING_SHORT: 'daniel'},
'picture': {BINARY_SHORT: base64.b64encode(binary_blob).decode(DEFAULT_ENCODING)}
}
}
})

expected_unprocessed_items = []
for idx in range(0, 5):
expected_unprocessed_items.append({
'PutRequest': {
'Item': {
'name': {STRING_SHORT: 'daniel'},
'picture': {BINARY_SHORT: binary_blob}
}
}
})

deep_eq(
Connection._handle_binary_attributes({UNPROCESSED_ITEMS: {'someTable': unprocessed_items}}),
{UNPROCESSED_ITEMS: {'someTable': expected_unprocessed_items}},
_assert=True
)

0 comments on commit 3d566a6

Please sign in to comment.