Skip to content

Commit

Permalink
make the assertions python 3.5 friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
kissiel committed Jan 11, 2024
1 parent 3f65a12 commit 7eef520
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion providers/base/tests/test_cpuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def test_hygon_dhyana_plus(self, cpuid_mock, co_mock, print_mock):
cpuid_mock.return_value = call_mock
co_mock.return_value = ""
main()
self.assertIn("Hygon Dhyana Plus", print_mock.mock_calls[1].args[0])
expected_msg = "CPUID: {} which appears to be a {} processor".format(
"0x900f22", "Hygon Dhyana Plus"
)
print_mock.assert_called_with(expected_msg)

@patch("subprocess.check_output")
@patch("cpuid.CPUID")
Expand Down

0 comments on commit 7eef520

Please sign in to comment.