mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +00:00
use '5 years ago' instead of absolute timestamp
This commit is contained in:
parent
1dc129b15d
commit
e5d6272b62
@ -3,6 +3,7 @@ import shutil
|
||||
import os.path
|
||||
import mock
|
||||
import re
|
||||
import time
|
||||
|
||||
from twisted.trial import unittest
|
||||
from twisted.internet import defer
|
||||
@ -293,6 +294,8 @@ class StatusMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_status(self):
|
||||
secs_per_year = 365 * 24 * 60 * 60.0
|
||||
|
||||
def json_for_cap(options, cap):
|
||||
if cap.startswith('URI:DIR2:'):
|
||||
return (
|
||||
@ -303,7 +306,7 @@ class StatusMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
|
||||
"size": 1234,
|
||||
"metadata": {
|
||||
"tahoe": {
|
||||
"linkcrtime": 0.0,
|
||||
"linkcrtime": (time.time() - (5 * secs_per_year)),
|
||||
},
|
||||
"version": 1,
|
||||
},
|
||||
@ -332,7 +335,7 @@ class StatusMagicFolder(MagicFolderCLITestMixin, unittest.TestCase):
|
||||
self.assertIn("default", stdout)
|
||||
|
||||
self.assertIn(
|
||||
"foo (1.23 kB): good, version=1, created 47 years ago",
|
||||
"foo (1.23 kB): good, version=1, created 5 years ago",
|
||||
stdout,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user