diff --git a/lib/mastodon.py b/lib/mastodon.py index 9a0af19..3889e73 100644 --- a/lib/mastodon.py +++ b/lib/mastodon.py @@ -150,7 +150,7 @@ def post_from_api_object(obj, instance): favourite=obj['favourited'], has_media=('media_attachments' in obj and bool(obj['media_attachments'])), - created_at=iso8601.parse_date(obj['created_at']), + created_at=obj['created_at'], author_id=account_from_api_object(obj['account'], instance).id, direct=obj['visibility'] == 'direct', ) diff --git a/test/test_libbrotli.py b/test/test_libbrotli.py index a87308f..4365f49 100644 --- a/test/test_libbrotli.py +++ b/test/test_libbrotli.py @@ -13,9 +13,10 @@ def app(redisdb): app_.config['REDIS_URI'] = 'redis://localhost:15487' app_.debug = True - @app_.route('/') - def hello(): - return 'Hello, world!' + @app_.route('/', defaults={'name': 'world'}) + @app_.route('/') + def hello(name='world'): + return 'Hello, {name}!'.format(name=name) with app_.app_context(): yield app_