| |
@@ -457,14 +457,17 @@
|
| |
mmd.set_xmd(xmd)
|
| |
module_build_service.utils.general.import_mmd(db_session, mmd)
|
| |
|
| |
- # Import another module which has overlapping virtual streams
|
| |
- another_mmd = load_mmd(read_staged_data("formatted_testmodule-more-components"))
|
| |
- # Add some virtual streams to this module metadata
|
| |
- xmd = another_mmd.get_xmd()
|
| |
- xmd["mbs"]["virtual_streams"] = ["f29", "f30"]
|
| |
- another_mmd.set_xmd(xmd)
|
| |
- another_module_build, _ = module_build_service.utils.general.import_mmd(
|
| |
- db_session, another_mmd)
|
| |
+ with pytest.raises(ValueError) as e_info:
|
| |
+ # Import another module which has overlapping virtual streams
|
| |
+ another_mmd = load_mmd(read_staged_data("formatted_testmodule-more-components"))
|
| |
+ # Add some virtual streams to this module metadata
|
| |
+ xmd = another_mmd.get_xmd()
|
| |
+ xmd["mbs"]["virtual_streams"] = ["f29", "f30"]
|
| |
+ another_mmd.set_xmd(xmd)
|
| |
+ another_module_build, _ = module_build_service.utils.general.import_mmd(
|
| |
+ db_session, another_mmd)
|
| |
+ assert e_info.value.args[0] == "Module contains virtual streams that overlap with " \
|
| |
+ "actual streams."
|
| |
|
| |
# Now, remove f30 from mmd
|
| |
xmd = mmd.get_xmd()
|
| |