test_date_filters.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ussd_airflow 作者: mwaaas 项目源码 文件源码
def test_using_filters(self):
        now = datetime.now()
        client = self.get_ussd_client()
        # dial in
        response = client.send('1')

        self.assertEqual(
            "The date today is {now}. We are on the {now_month} th month "
            "and we are on year {now_year}. Month in words is "
            "{now_month_name}. And day in words "
            "{now_day_name}. And next month {three_months}\n"
            "Testing striping date. After striping this "
            "date 2017-01-20 we should get the year, month and day. "
            "The day is {strip_day_name}\n".format(
                now=now,
                now_month=now.month,
                now_year=now.year,
                now_month_name=calendar.month_name[now.month],
                now_day_name=now.strftime("%A"),
                three_months=calendar.month_name[now.month + 3],
                strip_day_name=20
            ),
            response
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号