def setUp(self): migrate.initUp2dateConfig = lambda: {} self.engine = migrate.MigrationEngine() self.engine.cp = stubs.StubUEP() # These tests print a lot to stdout and stderr # so quiet them. sys.stdout = stubs.MockStdout() sys.stderr = stubs.MockStderr() self.double_mapped_channels = ( "rhel-i386-client-dts-5-beta", "rhel-i386-client-dts-5-beta-debuginfo", "rhel-i386-server-dts-5-beta", "rhel-i386-server-dts-5-beta-debuginfo", "rhel-x86_64-client-dts-5-beta", "rhel-x86_64-client-dts-5-beta-debuginfo", "rhel-x86_64-server-dts-5-beta", "rhel-x86_64-server-dts-5-beta-debuginfo", ) self.single_mapped_channels = ( "rhel-i386-client-dts-5", "rhel-i386-client-dts-5-debuginfo", "rhel-x86_64-client-dts-5", "rhel-x86_64-client-dts-5-debuginfo", "rhel-i386-server-dts-5", "rhel-i386-server-dts-5-debuginfo", "rhel-x86_64-server-dts-5", "rhel-x86_64-server-dts-5-debuginfo", )
def setUp(self): self.menu = migrate.Menu([ ("displayed-hello", "Hello"), ("displayed-world", "World"), ], "") sys.stdout = stubs.MockStdout() sys.stderr = stubs.MockStderr()
def setUp(self): super(TestMigration, self).setUp() migrate.initUp2dateConfig = lambda: {} patch('subscription_manager.migrate.migrate.ProductDatabase').start() self.engine = migrate.MigrationEngine(self.create_options()) self.engine.cp = stubs.StubUEP() # These tests print a lot to stdout and stderr # so quiet them. sys.stderr = stubs.MockStderr() self.double_mapped_channels = ( "rhel-i386-client-dts-5-beta", "rhel-i386-client-dts-5-beta-debuginfo", "rhel-i386-server-dts-5-beta", "rhel-i386-server-dts-5-beta-debuginfo", "rhel-x86_64-client-dts-5-beta", "rhel-x86_64-client-dts-5-beta-debuginfo", "rhel-x86_64-server-dts-5-beta", "rhel-x86_64-server-dts-5-beta-debuginfo", ) self.single_mapped_channels = ( "rhel-i386-client-dts-5", "rhel-i386-client-dts-5-debuginfo", "rhel-x86_64-client-dts-5", "rhel-x86_64-client-dts-5-debuginfo", "rhel-i386-server-dts-5", "rhel-i386-server-dts-5-debuginfo", "rhel-x86_64-server-dts-5", "rhel-x86_64-server-dts-5-debuginfo", )
def setUp(self): super(TestMigration, self).setUp() migrate.initUp2dateConfig = lambda: {} self.system_id = dedent(""" <params> <param> <value> <struct> <member> <name>system_id</name> <value> <string>ID-123</string> </value> </member> </struct> </value> </param> </params> """) patch('subscription_manager.migrate.migrate.ProductDatabase').start() with temp_file(self.system_id) as temp_id_file: with patch("subscription_manager.migrate.migrate.initUp2dateConfig") as init_conf: init_conf.return_value = {"systemIdPath": temp_id_file} self.engine = migrate.MigrationEngine(self.create_options()) self.engine.cp = stubs.StubUEP() self.system_id_file = temp_id_file # These tests print a lot to stdout and stderr # so quiet them. sys.stderr = stubs.MockStderr() self.double_mapped_channels = ( "rhel-i386-client-dts-5-beta", "rhel-i386-client-dts-5-beta-debuginfo", "rhel-i386-server-dts-5-beta", "rhel-i386-server-dts-5-beta-debuginfo", "rhel-x86_64-client-dts-5-beta", "rhel-x86_64-client-dts-5-beta-debuginfo", "rhel-x86_64-server-dts-5-beta", "rhel-x86_64-server-dts-5-beta-debuginfo", ) self.single_mapped_channels = ( "rhel-i386-client-dts-5", "rhel-i386-client-dts-5-debuginfo", "rhel-x86_64-client-dts-5", "rhel-x86_64-client-dts-5-debuginfo", "rhel-i386-server-dts-5", "rhel-i386-server-dts-5-debuginfo", "rhel-x86_64-server-dts-5", "rhel-x86_64-server-dts-5-debuginfo", )
def setUp(self): SubManFixture.setUp(self) sys.stdout = stubs.MockStdout() sys.stderr = stubs.MockStderr()
def setUp(self): sys.stdout = stubs.MockStdout() sys.stderr = stubs.MockStderr()