def test_needs_old_last_update_check_with_new_version():
"""Test for a last_update_check more than 3600 seconds ago, but version is new
and that it does not suggest an update"""
mock_config = mock.mock_open(read_data=CONFIG_DATA)
with mock.patch('two1.commands.util.config.open', mock_config, create=True):
c = config.Config('config_file', check_update=True)
c.set('last_update_check', 000000.000, should_save=True)
with capture_stdout(config.Config, 'config_file', check_update=True) as output:
assert len(output.strip()) == 0
评论列表
文章目录