Skip to content

Commit

Permalink
Updating test_batch for lint failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Sep 10, 2015
1 parent ce03fc1 commit 6ed8b17
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions gcloud_bigtable/happybase/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
import unittest2


class _SendMixin(object):

_send_called = False

def send(self):
self._send_called = True


class Test__get_column_pairs(unittest2.TestCase):

def _callFUT(self, columns):
Expand Down Expand Up @@ -223,6 +231,8 @@ def make_low_level_table(*args, **kwargs):
with _Monkey(MUT, _LowLevelTable=make_low_level_table):
result = batch._get_row(row_key)

self.assertEqual(result, mock_row)

# Check all the things that were constructed.
table_instance, = tables_constructed
self.assertEqual(table_instance.args, (name, cluster))
Expand Down Expand Up @@ -306,7 +316,7 @@ def _try_send(self):
batch = CallTrySend(table)

row_key = 'row-key'
batch._row_map[row_key] = row = _MockRow()
batch._row_map[row_key] = _MockRow()

self.assertEqual(batch._mutation_count, 0)
self.assertEqual(batch.try_send_calls, 0)
Expand Down Expand Up @@ -448,11 +458,3 @@ def __init__(self, *args, **kwargs):
def row(self, row_key):
self.rows_made.append(row_key)
return self.mock_row


class _SendMixin(object):

_send_called = False

def send(self):
self._send_called = True

0 comments on commit 6ed8b17

Please sign in to comment.