moto/tests/test_swf/test_utils.py
Jean-Baptiste Barth f4feec4727 Fix timestamps in tests as Travis builds run on GMT time
When launched manually, tests should be launched with the environment
variable TZ=GMT. Maybe this could be useful to add that explicitly
somewhere in the README or in the Makefile.
2015-11-19 11:45:26 +01:00

22 lines
463 B
Python

from freezegun import freeze_time
from sure import expect
from moto.swf.utils import (
decapitalize,
now_timestamp,
)
def test_decapitalize():
cases = {
"fooBar": "fooBar",
"FooBar": "fooBar",
"FOO BAR": "fOO BAR",
}
for before, after in cases.iteritems():
decapitalize(before).should.equal(after)
@freeze_time("2015-01-01 12:00:00")
def test_now_timestamp():
now_timestamp().should.equal(1420113600.0)