def test_needs_refresh_false(mock_stat): mock_stat.return_value = 12345 v = Video("foo.mkv", "/not-a-real-path/bar", size=12345) assert v._needs_refresh() is False
def test_needs_refresh_size_different(mock_stat): mock_stat.return_value = stat_return() v = Video("foo.mkv", "/not-a-real-path/bar", size=1) assert v._needs_refresh() is True