Skip to content

Commit

Permalink
Updating system tests after upstream changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Dec 23, 2015
1 parent 4f3132e commit 0e17f1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions system_tests/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from gcloud_bigtable._non_upstream_helpers import _microseconds_to_timestamp
from gcloud_bigtable._non_upstream_helpers import _timestamp_to_microseconds
from gcloud_bigtable.client import Client
from gcloud_bigtable.column_family import GarbageCollectionRule
from gcloud_bigtable.column_family import MaxVersionsGCRule
from gcloud_bigtable.row import RowFilter
from gcloud_bigtable.row import RowFilterChain
from gcloud_bigtable.row import RowFilterUnion
Expand Down Expand Up @@ -231,7 +231,7 @@ def test_create_column_family(self):
self.tables_to_delete.append(temp_table)

self.assertEqual(temp_table.list_column_families(), {})
gc_rule = GarbageCollectionRule(max_num_versions=1)
gc_rule = MaxVersionsGCRule(1)
column_family = temp_table.column_family(COLUMN_FAMILY_ID1,
gc_rule=gc_rule)
column_family.create()
Expand All @@ -240,7 +240,7 @@ def test_create_column_family(self):

self.assertEqual(len(col_fams), 1)
retrieved_col_fam = col_fams[COLUMN_FAMILY_ID1]
self.assertTrue(retrieved_col_fam.table is column_family.table)
self.assertTrue(retrieved_col_fam._table is column_family._table)
self.assertEqual(retrieved_col_fam.column_family_id,
column_family.column_family_id)
self.assertEqual(retrieved_col_fam.gc_rule, gc_rule)
Expand All @@ -251,7 +251,7 @@ def test_update_column_family(self):
temp_table.create()
self.tables_to_delete.append(temp_table)

gc_rule = GarbageCollectionRule(max_num_versions=1)
gc_rule = MaxVersionsGCRule(1)
column_family = temp_table.column_family(COLUMN_FAMILY_ID1,
gc_rule=gc_rule)
column_family.create()
Expand Down
3 changes: 2 additions & 1 deletion system_tests/run_happybase.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ def set_hbase_connection():
def set_cloud_bigtable_connection():
# pylint: disable=no-name-in-module
from grpc.framework.interfaces.face.face import NetworkError
from gcloud_bigtable import _non_upstream_helpers
from gcloud_bigtable import client as client_mod
from gcloud_bigtable.happybase import Connection
# pylint: enable=no-name-in-module

client_mod.PROJECT_ENV_VAR = 'GCLOUD_TESTS_PROJECT_ID'
_non_upstream_helpers.PROJECT_ENV_VAR = 'GCLOUD_TESTS_PROJECT_ID'
client = client_mod.Client(admin=True)
zone = 'us-central1-c'
cluster_id = 'gcloud-python'
Expand Down

0 comments on commit 0e17f1b

Please sign in to comment.