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 29f4ee4 commit 7f0cf8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions samples/hello/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
# 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-bigtable-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,
table_name)
main(PROJECT, BIGTABLE_CLUSTER, table_name)

out, _ = capsys.readouterr()
assert 'Creating the {} table.'.format(table_name) in out
Expand Down

0 comments on commit 7f0cf8f

Please sign in to comment.