2727import math
2828import pytest
2929from proto .marshal .rules .dates import DurationRule , TimestampRule
30-
30+ from proto . marshal . rules import wrappers
3131
3232from google .api_core import client_options
3333from google .api_core import exceptions as core_exceptions
@@ -2004,19 +2004,22 @@ def test_parse_annotated_dataset_path():
20042004
20052005def test_dataset_path ():
20062006 project = "cuttlefish"
2007- dataset = "mussel"
2008- expected = "projects/{project}/datasets/{dataset}" .format (
2007+ location = "mussel"
2008+ dataset = "winkle"
2009+ expected = "projects/{project}/locations/{location}/datasets/{dataset}" .format (
20092010 project = project ,
2011+ location = location ,
20102012 dataset = dataset ,
20112013 )
2012- actual = MigrationServiceClient .dataset_path (project , dataset )
2014+ actual = MigrationServiceClient .dataset_path (project , location , dataset )
20132015 assert expected == actual
20142016
20152017
20162018def test_parse_dataset_path ():
20172019 expected = {
2018- "project" : "winkle" ,
2019- "dataset" : "nautilus" ,
2020+ "project" : "nautilus" ,
2021+ "location" : "scallop" ,
2022+ "dataset" : "abalone" ,
20202023 }
20212024 path = MigrationServiceClient .dataset_path (** expected )
20222025
@@ -2026,22 +2029,19 @@ def test_parse_dataset_path():
20262029
20272030
20282031def test_dataset_path ():
2029- project = "scallop"
2030- location = "abalone"
2031- dataset = "squid"
2032- expected = "projects/{project}/locations/{location}/datasets/{dataset}" .format (
2032+ project = "squid"
2033+ dataset = "clam"
2034+ expected = "projects/{project}/datasets/{dataset}" .format (
20332035 project = project ,
2034- location = location ,
20352036 dataset = dataset ,
20362037 )
2037- actual = MigrationServiceClient .dataset_path (project , location , dataset )
2038+ actual = MigrationServiceClient .dataset_path (project , dataset )
20382039 assert expected == actual
20392040
20402041
20412042def test_parse_dataset_path ():
20422043 expected = {
2043- "project" : "clam" ,
2044- "location" : "whelk" ,
2044+ "project" : "whelk" ,
20452045 "dataset" : "octopus" ,
20462046 }
20472047 path = MigrationServiceClient .dataset_path (** expected )
0 commit comments