Skip to content

Commit f55750b

Browse files
committed
Update protoc tests
1 parent 00b241e commit f55750b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

protoc-gen-connect-python/generator/generator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func TestGenerateConnectFile(t *testing.T) {
106106
}
107107

108108
content := got.GetContent()
109-
if !strings.Contains(content, "from collections.abc import AsyncIterator, Iterable, Iterator, Mapping") {
109+
if !strings.Contains(content, "from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping") {
110110
t.Error("Generated code missing required imports")
111111
}
112112
if !strings.Contains(content, "class "+strings.Split(tt.input.GetService()[0].GetName(), ".")[0]) {

protoc-gen-connect-python/generator/template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var ConnectTemplate = template.Must(template.New("ConnectTemplate").Parse(`# -*-
4444
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
4545
# source: {{.FileName}}
4646
{{if .Services}}
47-
from collections.abc import AsyncIterator, AsyncGenerator, Iterable, Iterator, Mapping
47+
from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
4848
from typing import Protocol
4949
5050
from connectrpc.client import ConnectClient, ConnectClientSync

protoc-gen-connect-python/generator/template_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ func TestConnectTemplate(t *testing.T) {
3636
},
3737
},
3838
contains: []string{
39-
"from collections.abc import AsyncIterator, Iterable, Iterator, Mapping",
39+
"from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping",
4040
"class TestService(Protocol):",
41-
"class TestServiceASGIApplication(ConnectASGIApplication):",
41+
"class TestServiceASGIApplication(ConnectASGIApplication[TestService]):",
4242
"def TestMethod",
4343
},
4444
},

0 commit comments

Comments
 (0)