Skip to content

Commit

Permalink
repair unit tests after finishing adding last remaining regexes from …
Browse files Browse the repository at this point in the history
…master list
  • Loading branch information
scbedd committed Apr 17, 2024
1 parent 1c3a6b0 commit eca14ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private static void AssertLogs(TestLogger logger, int offset, int expectedLength
Assert.Equal("URI: [ https://fakeazsdktestaccount.table.core.windows.net/Tables]" +
Environment.NewLine + "Headers: [{\"Accept\":[\"application/json;odata=minimalmetadata\"],\"Accept-Encoding\":[\"gzip, deflate\"],\"Authorization\":[\"Sanitized\"],\"Connection\":[\"keep-alive\"]," +
"\"Content-Length\":[\"12\"],\"Content-Type\":[\"application/octet-stream\"],\"DataServiceVersion\":[\"3.0\"],\"Date\":[\"Tue, 18 May 2021 23:27:42 GMT\"]," +
"\"User-Agent\":[\"azsdk-python-data-tables/12.0.0b7 Python/3.8.6 (Windows-10-10.0.19041-SP0)\"],\"x-ms-client-request-id\":[\"a4c24b7a-b830-11eb-a05e-10e7c6392c5a\"]," +
"\"User-Agent\":[\"azsdk-python-data-tables/12.0.0b7 Python/3.8.6 (Windows-10-10.0.19041-SP0)\"],\"x-ms-client-request-id\":[\"Sanitized\"]," +
"\"x-ms-date\":[\"Tue, 18 May 2021 23:27:42 GMT\"],\"x-ms-version\":[\"2019-02-02\"]}]" + Environment.NewLine,
logger.Logs[3 + offset].ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ private void _checkDefaultExtensions(RecordingHandler handlerForTest, CheckSkips
{
Assert.Equal(DefaultExtensionCount, handlerForTest.Sanitizers.Count);
Assert.IsType<RecordedTestSanitizer>(handlerForTest.Sanitizers[0]);
Assert.IsType<BodyKeySanitizer>(handlerForTest.Sanitizers[1]);
Assert.IsType<GeneralRegexSanitizer>(handlerForTest.Sanitizers[1]);
Assert.IsType<GeneralRegexSanitizer>(handlerForTest.Sanitizers[2]);
Assert.IsType<BodyKeySanitizer>(handlerForTest.Sanitizers[15]);
Assert.IsType<BodyRegexSanitizer>(handlerForTest.Sanitizers[108]);
}
}
#endregion
Expand Down Expand Up @@ -444,7 +446,7 @@ public async Task TestCanSkipRecordingEntireRequestResponse()
var record = RecordSession.Deserialize(doc.RootElement);
Assert.Single(record.Entries);
var entry = record.Entries.First();
Assert.Equal("value", JsonDocument.Parse(entry.Request.Body).RootElement.GetProperty("key").GetString());
Assert.Equal("Sanitized", JsonDocument.Parse(entry.Request.Body).RootElement.GetProperty("key").GetString());
Assert.Equal(MockHttpHandler.DefaultResponse, Encoding.UTF8.GetString(entry.Response.Body));
}
finally
Expand Down

0 comments on commit eca14ae

Please sign in to comment.