Skip to content

Commit 0433a86

Browse files
committed
revert test generator
1 parent 430cf9d commit 0433a86

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

packages/gapic-generator/tests/unit/generator/test_generator.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -136,30 +136,6 @@ def test_get_response_ignores_private_files():
136136
assert cgr.file[0].content == "I am a template result.\n"
137137

138138

139-
def test_get_response_renders_allowed_private_templates():
140-
generator_obj = make_generator()
141-
with mock.patch.object(jinja2.FileSystemLoader, "list_templates") as list_templates:
142-
list_templates.return_value = [
143-
"foo/bar/__init__.py.j2",
144-
"foo/bar/_compat.py.j2",
145-
"foo/bar/_ignored.py.j2",
146-
]
147-
with mock.patch.object(jinja2.Environment, "get_template") as get_template:
148-
get_template.return_value = jinja2.Template("I am a template result.")
149-
cgr = generator_obj.get_response(
150-
api_schema=make_api(), opts=Options.build("")
151-
)
152-
list_templates.assert_called_once()
153-
get_template.assert_has_calls(
154-
[
155-
mock.call("foo/bar/__init__.py.j2"),
156-
mock.call("foo/bar/_compat.py.j2"),
157-
],
158-
any_order=True,
159-
)
160-
assert len(cgr.file) == 2
161-
162-
163139
def test_get_response_fails_invalid_file_paths():
164140
generator_obj = make_generator()
165141
with mock.patch.object(jinja2.FileSystemLoader, "list_templates") as list_templates:

0 commit comments

Comments
 (0)