Example #1
0
 def test_update_exception(self):
     """ Package.update() exception test """
     Config.params['cvsupdate'] = 'wrongcvs'
     with self.assertRaises(PackageError) as context:
         Package.update()
         self.assertTrue(PackageError == context.expected)
     Config.params['cvsupdate'] = '/usr/bin/git pull origin master'
Example #2
0
    def test_update_windows(self):
        """ Package.update() test """

        Config.params['cfg'] = 'setup.cfg'
        Config.params['update'] = '{status}'
        setattr(sys, 'is_windows', True)
        expected = Package.update()
        self.assertIsNotNone(expected)
Example #3
0
    def test_update_unix(self):
        """ Package.update() unix test """

        Config.params['cfg'] = 'setup.cfg'
        Config.params['update'] = '{status}'
        expected = Package.update()
        self.assertIsNotNone(expected)
        self.assertIs(type(expected), str)
Example #4
0
    def test_update_exception(self):
        """ Package.update() exception test """

        with self.assertRaises(PackageError) as context:
            Package.update()
            self.assertTrue(PackageError == context.expected)