From 5017fbae7f1d95a0845af05f5ef0bbe1647bb8a6 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Jul 22 2019 02:07:53 +0000 Subject: Refactor make_module for tests The original motivation for this refactor is to reuse make_module and drop TestMMDResolver._make_mmd. Some tests require a modulemd created and some tests also require those modulemd to be stored into database as a module build. The problem is db_session has to be passed to make_module even if no need to store into database. Major changes in this patch: * Argument db_session is optional. * Arguments requires_list and build_requires_list are replaced by a single argument dependencies which is a list of group of requires and buildrequires * A new make_module_in_db is created for creating and storing the new modulemd into database conveniently. * Tests are updated with the new make_module and make_module_in_db. Signed-off-by: Chenxiong Qi --- diff --git a/tests/__init__.py b/tests/__init__.py index 87abb24..d31a5b1 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -20,6 +20,7 @@ # # Written by Matt Prahl