blob: 7eab137d2c9e7227f191d4de74d9f07280d37d99 [file] [log] [blame]
# Copyright 2014 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Utilities for seeders."""
import datetime
# Some sample long text
LOREM_IPSUM = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
ultrices mollis tortor, eget fringilla massa gravida vel. Nulla vitae
eleifend neque, at tincidunt massa. Pellentesque a auctor metus, non
malesuada ligula. Fusce scelerisque ac lectus ornare
luctus. Suspendisse euismod arcu quis quam hendrerit eleifend. Nam
tempus ornare imperdiet. Aliquam ex elit, pulvinar sit amet nulla nec,
feugiat molestie magna. Aliquam erat volutpat. Nulla non convallis
est. Pellentesque laoreet tellus ligula, ut fermentum nunc faucibus
id. Mauris tempus nec elit at sodales. Nam pretium felis justo,
sollicitudin suscipit orci gravida eget. Maecenas ut pharetra turpis,
eget euismod massa. Pellentesque leo orci, eleifend in tempor quis,
cursus sit amet tellus. Fusce sit amet massa vel tellus consectetur
feugiat sed luctus quam.
"""
def pastDateTime(delta=100):
"""Returns a datetime that is delta days in the past."""
return datetime.datetime.today() - datetime.timedelta(delta)
def futureDateTime(delta=100):
"""Returns a datetime that is delta days in the future."""
return datetime.datetime.today() + datetime.timedelta(delta)