Create a revision before deleting all previous

This commit is contained in:
Tasos Katsoulas 2022-01-26 13:43:51 +00:00
Родитель 13b6b0deeb
Коммит 0355c4772b
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -241,11 +241,11 @@ class CronJobTests(TestCase):
# If we remove the two MEDIUM_SIGNIFICANCE revisions and add a
# MAJOR_SIGNIFICANCE revision, the coverage is 50% as well.
m1.delete()
m2.delete()
ApprovedRevisionFactory(
document=doc, significance=MAJOR_SIGNIFICANCE, is_ready_for_localization=True
)
m1.delete()
m2.delete()
Metric.objects.all().delete()
call_command("update_l10n_metric")
metrics = Metric.objects.filter(kind=l10n_kind)