#4158 Fix asserts in unit tests
Merged by tkopecek. Opened by jcupova.
jcupova/koji fix-asserts-in-tests  into  master

Download 4158.patch
no initial comment

Thanks for catching those typos!

This PR does quite a bit more than the subject implies:

  • reorder imports
  • drop an import
  • adjust whitespace
  • drop unused variable
  • dropping a test with a duplicate name

The assert typos certainly need to be fixed.

The whitespace cleanup is fine.

With python3, our primary target, mock is a built in module, so it makes sense to group the import as such, but I'm not terribly concerned about this aspect of the import order.

However, dropping the test is incorrect.

If you compare the two versions of test_request_priority_lower_than_existing, you'll see they are different. Both tests are needed. The problem is that the second one is incorrectly named -- it should have been test_request_priority_higher_than_existing. I've fixed this here:

https://pagure.io/fork/mikem/koji/commits/pr4158updates

2 new commits added

  • restore test
  • fix test name

@mikem I cherry-picked your commits :-)

Commit abfe1f20 fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata