-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace bin in easy tests #1248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test files should go to test/files
folder. we don't need the full directory structure for tests.
The content path usage in the test is not right. Looks like these tests are working, even with these packages that are not exactly the same as what were trying to mock, but that could be because the tests are not checking a lot of things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files should go to test/files
folder.
test/mockdata/mock_appdata.py
Outdated
|
||
APPDATA = get_tested_mock_package( | ||
files={ | ||
'/usr/share/appdata/broken.appdata.xml': {'content_path': '/usr/share/appdata/broken.appdata.xml'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct path to use after move files to test/files
will be:
'/usr/share/appdata/broken.appdata.xml': {'content-path': 'files/broken.appdata.xml'},
And the correct key is content-path
not content_path
, that's why even with the full system path this is working.
Also, creating a mock file to improve code cleanup of the test_appdata.py file
The files are placed in the test/files directory
Also, creating a mock file to improve code cleanup of the test_dbus_policy.py file
Also, creating a mock file to improve code cleanup of the test_build_root.py file. As for pkg: Move read_with_mmap method to AbstractPkg This method is needed for test_build_root so to be able to use FakePkg here we need this method implemented in both classes Pkg and FakePkg
Also, creating a mock file to improve code cleanup of the test_mixed_ownership.py file. Some necessary changes are made to the pkg.py file.
Also, creating mock files to improve code cleanup of files.