Example #1
0
 def test_with_args(self, parserclass):
     """Expect arguments pass to the parser after user config file."""
     mock_conf = parserclass.return_value
     result = config.load('spam', 'ham', 'eggs')
     self.assertIs(result, mock_conf)
     mock_conf.read.assert_called_once_with((config.user_path(),
                                             'spam', 'ham', 'eggs'))
Example #2
0
 def test_without_args(self, parserclass):
     """Expect config object that tried to parse user config file."""
     mock_conf = parserclass.return_value
     result = config.load()
     self.assertIs(result, mock_conf)
     mock_conf.read.assert_called_once_with((config.user_path(),))