Skip to content

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shemogumbe committed Oct 22, 2024
1 parent a347783 commit 657fbef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,8 @@ private string GetSerializationMethodName(CodeTypeBase propType)
private string GetTypeFactory(bool isVoid, bool isStream, string returnType)
{
if (isVoid) return string.Empty;
if (isStream || conventions.IsPrimitiveType(returnType)) return $" {returnType},";

if (isStream) return $" \"{returnType}\",";
if (conventions.IsPrimitiveType(returnType)) return $" {returnType},";
return $" {returnType},";
}
private string GetSendRequestMethodName(bool isVoid, bool isStream, bool isCollection, string returnType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ public void WritesUnionDeSerializerBody()
}
[Theory]
[InlineData(true, false, "string", "")]
[InlineData(false, true, "Stream", " Stream,")]
[InlineData(false, true, "Stream", " \"Stream\",")]
[InlineData(false, false, "int", " int,")]
[InlineData(false, false, "CustomType", " CustomType,")]
public void GetTypeFactory_ReturnsCorrectString(bool isVoid, bool isStream, string returnType, string expected)
Expand Down

0 comments on commit 657fbef

Please sign in to comment.