diff options
author | Wouter Bolsterlee <uws@xs4all.nl> | 2012-05-24 13:28:30 +0200 |
---|---|---|
committer | Wouter Bolsterlee <uws@xs4all.nl> | 2012-05-24 13:28:30 +0200 |
commit | 49c6a4197f6417a69934f3023dbfa07b4ee1ea8a (patch) | |
tree | dce8eed373ce10d1fe5c155355ac9c3aa9083d19 /tests | |
parent | 08dc2fc3a09e9ad1bf3780bc0dbb9db6d21a5bc1 (diff) | |
download | happybase-49c6a4197f6417a69934f3023dbfa07b4ee1ea8a.tar.gz |
Implement partial scanner API for HBase 0.90 compat mode
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_api.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index 5519728..9be4425 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -29,7 +29,8 @@ def setup_module(): global connection, table connection = happybase.Connection(host=os.environ.get('HAPPYBASE_HOST'), port=os.environ.get('HAPPYBASE_PORT'), - table_prefix=TABLE_PREFIX) + table_prefix=TABLE_PREFIX, + compat='0.90') assert_is_not_none(connection) cfs = { @@ -54,6 +55,7 @@ def test_connection_compat(): with assert_raises(ValueError): happybase.Connection(compat='0.1.invalid.version') + def test_enabling(): assert_true(connection.is_table_enabled(TEST_TABLE_NAME)) connection.disable_table(TEST_TABLE_NAME) @@ -368,6 +370,12 @@ def test_scan(): scanner = table.scan(row_prefix='row-scan-b', batch_size=5, limit=10) assert_equal(10, calc_len(scanner)) + scanner = table.scan(timestamp=123) + assert_equal(0, calc_len(scanner)) + + scanner = table.scan(row_prefix='row', timestamp=123) + assert_equal(0, calc_len(scanner)) + def test_delete(): row_key = 'row-test-delete' |