theupdateframework / theupdateframework/python-tuf

ngtests: improve _assert* methods

Aperta
#1,669 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@MVrachev ci sta già lavorando.

Dal 23/2/2022.

backlog testing
Lingua principale
Python
Stelle
1.7k
Fork
304
Merge medio
1g 2h
PR unite (30g)
17

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.