@pytest.mark.django_db
def test_scan_empty_project_obsolete_dirs(project0_nongnu, store0):
 tp = store0.translation_project
 tp.scan_files()
 for item in tp.directory.child_dirs.all():
  assert item.obsolete
 assert tp.directory.obsolete

@ pytest . mark . django_db def test_scan_empty_project_obsolete_dirs ( project0_nongnu , store0 ) : tp = store0 . translation_project tp . scan_files ( ) for item in tp . directory . child_dirs . all ( ) : assert item . obsolete assert tp . directory . obsolete
tests that the in-db directories are marked as obsolete if the on-disk directories are empty .