test_commands.py 文件源码

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

项目:django-url-migration 作者: socialwifi 项目源码 文件源码
def test_if_regexp_mapping_is_removed(self):
        log = factories.LastUsageLogFactory(used_date=timezone.datetime(1999, 12, 10, 22, 11, tzinfo=pytz.utc))
        factories.UrlRegexpMappingFactory(last_usage=log, id=233)
        management.call_command('remove_expired_redirects')
        self.assertFalse(models.UrlRegexpMapping.objects.filter(pk=233).exists())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号