Skip to content

Commit

Permalink
Remove cloud config fixture [(googleapis#887)](GoogleCloudPlatform/py…
Browse files Browse the repository at this point in the history
…thon-docs-samples#887)

* Remove cloud config fixture

* Fix client secrets

* Fix bigtable instance
  • Loading branch information
Jon Wayne Parrott authored and dpebot committed Apr 4, 2017
1 parent bf532d4 commit 52c4b26
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions samples/hello_happybase/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import random

from main import main

PROJECT = os.environ['GCLOUD_PROJECT']
BIGTABLE_CLUSTER = os.environ['BIGTABLE_CLUSTER']
TABLE_NAME_FORMAT = 'hello_happybase-system-tests-{}'
TABLE_NAME_RANGE = 10000


def test_main(cloud_config, capsys):
def test_main(capsys):
table_name = TABLE_NAME_FORMAT.format(
random.randrange(TABLE_NAME_RANGE))
main(
cloud_config.project,
cloud_config.bigtable_instance,
PROJECT,
BIGTABLE_CLUSTER,
table_name)

out, _ = capsys.readouterr()
Expand Down

0 comments on commit 52c4b26

Please sign in to comment.