def test_create_ports_tree(self): ''' Test if it not working need to run portfetch non interactive. ''' mock = MagicMock(return_value='salt stack') with patch.dict(poudriere.__salt__, {'cmd.run': mock}): self.assertEqual(poudriere.create_ports_tree(), 'salt stack')
def test_create_ports_tree(self): ''' Test if it not working need to run portfetch non interactive. ''' mock = MagicMock(return_value='salt stack') with patch.dict(poudriere.__salt__, {'cmd.run': mock}): self.assertEqual(poudriere.create_ports_tree(), 'salt stack')
def test_create_ports_tree(): """ Test if it not working need to run portfetch non interactive. """ mock = MagicMock(return_value="salt stack") with patch.dict(poudriere.__salt__, {"cmd.run": mock}), patch( "salt.modules.poudriere._check_config_exists", MagicMock(return_value=True)): assert poudriere.create_ports_tree() == "salt stack"
def test_create_ports_tree(self): ''' Test if it not working need to run portfetch non interactive. ''' mock = MagicMock(return_value='salt stack') with patch.dict(poudriere.__salt__, {'cmd.run': mock}), \ patch('salt.modules.poudriere._check_config_exists', MagicMock(return_value=True)): self.assertEqual(poudriere.create_ports_tree(), 'salt stack')