Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
chore: re-order tests (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Jun 25, 2020
1 parent 4e44419 commit 99b6873
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 31 deletions.
1 change: 1 addition & 0 deletions samples/AUTHORING_GUIDE.md
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md
1 change: 1 addition & 0 deletions samples/CONTRIBUTING.md
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md
4 changes: 2 additions & 2 deletions synth.metadata
Expand Up @@ -3,8 +3,8 @@
{
"git": {
"name": ".",
"remote": "git@github.com:googleapis/python-service-directory",
"sha": "9d7c27ee83b06f1d1fb7f757677dd1ccfbf3a9ad"
"remote": "https://github.com/googleapis/python-service-directory.git",
"sha": "4e444190b7bc41f66cfb79c9260565f1702e6fbc"
}
},
{
Expand Down
58 changes: 29 additions & 29 deletions tests/unit/servicedirectory_v1beta1/test_registration_service.py
Expand Up @@ -2118,35 +2118,6 @@ def test_registration_service_grpc_transport_channel_mtls_with_adc(
assert transport.grpc_channel == mock_grpc_channel


def test_service_path():
project = "squid"
location = "clam"
namespace = "whelk"
service = "octopus"

expected = "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}".format(
project=project, location=location, namespace=namespace, service=service
)
actual = RegistrationServiceClient.service_path(
project, location, namespace, service
)
assert expected == actual


def test_parse_service_path():
expected = {
"project": "oyster",
"location": "nudibranch",
"namespace": "cuttlefish",
"service": "mussel",
}
path = RegistrationServiceClient.service_path(**expected)

# Check that the path construction is reversible.
actual = RegistrationServiceClient.parse_service_path(path)
assert expected == actual


def test_endpoint_path():
project = "squid"
location = "clam"
Expand Down Expand Up @@ -2182,6 +2153,35 @@ def test_parse_endpoint_path():
assert expected == actual


def test_service_path():
project = "squid"
location = "clam"
namespace = "whelk"
service = "octopus"

expected = "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}".format(
project=project, location=location, namespace=namespace, service=service
)
actual = RegistrationServiceClient.service_path(
project, location, namespace, service
)
assert expected == actual


def test_parse_service_path():
expected = {
"project": "oyster",
"location": "nudibranch",
"namespace": "cuttlefish",
"service": "mussel",
}
path = RegistrationServiceClient.service_path(**expected)

# Check that the path construction is reversible.
actual = RegistrationServiceClient.parse_service_path(path)
assert expected == actual


def test_namespace_path():
project = "squid"
location = "clam"
Expand Down

0 comments on commit 99b6873

Please sign in to comment.