Exemple #1
0
    def test_git_but_no_environ(self):
        self.mock_os.environ = {}

        filename = get_config_file()

        self.mock_git_root.assert_called_once_with()
        self.mock_join.assert_called_once_with(sentinel.git_root, '.issue2branch.config')
        eq_(filename, sentinel.filename)
Exemple #2
0
    def test_environ_and_no_git(self):
        self.mock_os.environ = {'ISSUE2BRANCH_CONFIG': sentinel.environ_filename}
        self.mock_git_root.side_effect = iter([Exception()])
        filename = get_config_file()

        eq_(filename, sentinel.environ_filename)
Exemple #3
0
    def test_git_and_environ(self):
        self.mock_os.environ = {'ISSUE2BRANCH_CONFIG': sentinel.environ_filename}

        filename = get_config_file()

        eq_(filename, sentinel.environ_filename)