python-tuf icon indicating copy to clipboard operation
python-tuf copied to clipboard

ngtests: improve _assert* methods

Open sechkova opened this issue 4 years ago • 0 comments

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_equals calls the private method Repositorysimulator._fetch_metadata() to get the metadata content in bytes.

A smarter approach is needed, be it integrated in Repositorysimulator or not.

sechkova avatar Nov 09 '21 12:11 sechkova