python-tuf
python-tuf copied to clipboard
ngtests: improve _assert* methods
Description of issue or feature request:
Currently #1636 proposes three types of asserts for checking the state of local metadata:
_assert_files_exist_assert_content_equals_assert_version_equals
These still have some issues (see https://github.com/theupdateframework/python-tuf/pull/1636#discussion_r74079588, https://github.com/theupdateframework/python-tuf/pull/1636#pullrequestreview-794981714)
- non-trivial to pick which assert to use in which test case
_assert_content_equalscalls the private methodRepositorysimulator._fetch_metadata()to get the metadata content in bytes.
A smarter approach is needed, be it integrated in Repositorysimulator or not.