We want to test API methods which calls dnf. Unfortunately, calling dnf is expensive operation - it requires network access and downloading a lot of (meta)data. This commit changes the rpmmd implementation so that it can be mocked.