def test_path_with_reprd_object(self): class something(object): pass thefile = os.path.join(self.user_dir, "config") payload = something() with open(thefile, "w") as f: f.write(repr(payload)) result = read_user_config(self.user_dir) self.assertEqual({}, result)
def test_path_without_config_file(self): """We pass a path but if does not contain a "config" file.""" result = read_user_config(self.user_dir) self.assertEqual({}, result)
def test_no_path_means_no_result(self): result = read_user_config(None) self.assertEqual({}, result)