Cleanup different places using unix_time()

This commit is contained in:
Steve Pulec 2015-11-27 14:14:40 -05:00
commit 705ec314a3
15 changed files with 60 additions and 82 deletions

View file

@ -1,7 +1,9 @@
from __future__ import unicode_literals
import sure
from moto.core.utils import camelcase_to_underscores, underscores_to_camelcase
import sure # noqa
from freezegun import freeze_time
from moto.core.utils import camelcase_to_underscores, underscores_to_camelcase, unix_time
def test_camelcase_to_underscores():
@ -20,3 +22,8 @@ def test_underscores_to_camelcase():
}
for arg, expected in cases.items():
underscores_to_camelcase(arg).should.equal(expected)
@freeze_time("2015-01-01 12:00:00")
def test_unix_time():
unix_time().should.equal(1420113600.0)

View file

@ -1,10 +1,6 @@
from freezegun import freeze_time
from sure import expect
import sure # noqa
from moto.swf.utils import (
decapitalize,
now_timestamp,
)
from moto.swf.utils import decapitalize
def test_decapitalize():
@ -15,7 +11,3 @@ def test_decapitalize():
}
for before, after in cases.items():
decapitalize(before).should.equal(after)
@freeze_time("2015-01-01 12:00:00")
def test_now_timestamp():
now_timestamp().should.equal(1420113600.0)