예제 #1
0
    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()
            )
예제 #2
0
파일: test_gem.py 프로젝트: morinap/salt-1
    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())
예제 #3
0
    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(),
            )