5017fba Refactor make_module for tests

Authored and Committed by cqi a year ago
    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 <cqi@redhat.com>
    
        
file modified
+63 -43
file modified
+13 -3
file modified
+22 -24