def test_list_upgrades(self): output = ''' arel (5.0.1.20140414130214 < 6.0.0) rails (4.1.9 < 4.2.0) rake (10.3.2 < 10.4.2) ''' mock = MagicMock(return_value=output) with patch.object(gem, '_gem', new=mock): self.assertEqual( {'arel': '6.0.0', 'rails': '4.2.0', 'rake': '10.4.2'}, gem.list_upgrades() )
def test_list_upgrades(self): output = ''' arel (5.0.1.20140414130214 < 6.0.0) rails (4.1.9 < 4.2.0) rake (10.3.2 < 10.4.2) ''' mock = MagicMock(return_value=output) with patch.object(gem, '_gem', new=mock): self.assertEqual( { 'arel': '6.0.0', 'rails': '4.2.0', 'rake': '10.4.2' }, gem.list_upgrades())
def test_list_upgrades(self): output = """ arel (5.0.1.20140414130214 < 6.0.0) rails (4.1.9 < 4.2.0) rake (10.3.2 < 10.4.2) """ mock = MagicMock(return_value=output) with patch.object(gem, "_gem", new=mock): self.assertEqual( { "arel": "6.0.0", "rails": "4.2.0", "rake": "10.4.2" }, gem.list_upgrades(), )