Update the Git unit tests to use build_client() and clean up tests.

Review Request #12505 — Created Aug. 5, 2022 and submitted

Information

RBTools
release-3.x

Reviewers

This updates the Git unit tests to build a GitClient in each test
where it's needed, rather than in setUp(). This is in prepration for
new tests that will need to handle client construction differently.

This also cleans up a lot of the assertions to be less verbose.

We had a lot of combinations of checking instance type, key presence,
and then values, but this is far less useful (less accurate) than just
checking dictionaries for equality. We missed things because we weren't
doing these checks.

We also had MD5-based checks for diffs, but these make diagnostics
difficult.

Given the work being done already in each function, I felt this was the
best time to clean this code up.

Git unit tests pass.

Summary ID
Update the Git unit tests to use build_client() and clean up tests.
This updates the Git unit tests to build a `GitClient` in each test where it's needed, rather than in `setUp()`. This is in prepration for new tests that will need to handle client construction differently. This also cleans up a lot of the assertions to be less verbose. We had a lot of combinations of checking instance type, key presence, and then values, but this is far less useful (less accurate) than just checking dictionaries for equality. We missed things because we weren't doing these checks. We also had MD5-based checks for diffs, but these make diagnostics difficult. Given the work being done already in each function, I felt this was the best time to clean this code up.
718a3ceee3d70f06837d7f90c03c9893587a4984
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (2fa8359)