Example #1
0
    def test_remove_repo(self):
        test_config_path = join(test_data_folder, 'remove_test_config.json')

        with open(self.path, 'w') as json_data_file, open(test_config_path) as test_config_file:
            json_data_file.write(test_config_file.read())

        cli.remove_repo('path/one')

        with open(self.path) as test_config_file:
            self.assertEqual(['path/two'], loads(test_config_file.read())['repositories'])
Example #2
0
    def test_remove_repo(self):
        test_config_path = join(test_data_folder, 'remove_test_config.json')

        with open(self.path, 'w') as json_data_file, open(
                test_config_path) as test_config_file:
            json_data_file.write(test_config_file.read())

        cli.remove_repo('path/one')

        with open(self.path) as test_config_file:
            self.assertEqual(['path/two'],
                             loads(test_config_file.read())['repositories'])
Example #3
0
 def test_remove_repo_checks_for_existing(self):
     self.assertEqual('{} is not in the repositories list!'.format('blah'),
                      cli.remove_repo('blah'))
Example #4
0
 def test_remove_repo_checks_for_existing(self):
     self.assertEqual('{} is not in the repositories list!'.format('blah'), cli.remove_repo('blah'))