2015-11-02 10:26:40 +01:00
|
|
|
from freezegun import freeze_time
|
2015-10-19 09:25:54 +02:00
|
|
|
from sure import expect
|
2015-11-02 10:26:40 +01:00
|
|
|
|
|
|
|
from moto.swf.utils import (
|
|
|
|
decapitalize,
|
|
|
|
now_timestamp,
|
|
|
|
)
|
|
|
|
|
2015-10-19 09:25:54 +02:00
|
|
|
|
|
|
|
def test_decapitalize():
|
|
|
|
cases = {
|
|
|
|
"fooBar": "fooBar",
|
|
|
|
"FooBar": "fooBar",
|
|
|
|
"FOO BAR": "fOO BAR",
|
|
|
|
}
|
2015-11-03 09:17:56 +01:00
|
|
|
for before, after in cases.items():
|
2015-10-19 09:25:54 +02:00
|
|
|
decapitalize(before).should.equal(after)
|
2015-11-02 10:26:40 +01:00
|
|
|
|
|
|
|
@freeze_time("2015-01-01 12:00:00")
|
|
|
|
def test_now_timestamp():
|
2015-11-03 09:09:00 +01:00
|
|
|
now_timestamp().should.equal(1420113600.0)
|