Commit graph

7 commits

Author SHA1 Message Date
Nils Philippsen
7fe0937190 Using real objects is considered polite
Previously, ToddlerBase and derived classes were used directly, but none
of the methods is marked as a class or static method. Amazingly enough,
it worked regardless. It's useful to have a constructor, though, so do
things conventionally.

As we can't just monkey-patch the classes then, use the shared `toddler`
fixture which creates the object for the test methods that need it.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-07-17 17:39:28 +02:00
Nils Philippsen
8be9cead78 Fix import order, separation to appease flake8
Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-07-02 12:51:48 +02:00
Pierre-Yves Chibon
18a3d50029 Add a new test to tests/plugins/test_flag_commit_build.py
This tests has a message supposedly coming from koji and where the
task_id is None.
This brings the coverage of the code to 100%.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-29 17:10:43 +02:00
Pierre-Yves Chibon
7af467ef1d Make the tests flake8 valid and enforce it in tox
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-26 15:18:09 +00:00
Pierre-Yves Chibon
77daf0492c Black run/fix
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-25 10:37:31 +02:00
Pierre-Yves Chibon
519d73d0e4 Move the User-URL log to info so we can easily checked that toddlers behave as expected
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-25 10:36:24 +02:00
Pierre-Yves Chibon
edeafd6159 Add unit-tests for toddlers
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-19 17:10:01 +02:00