test_commands.py 文件源码

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

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


问题


面经


文章

微信
公众号

扫码关注公众号