Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)

src/d/j/django-daguerre-HEAD/daguerre/tests/unit/test_management.py   django-daguerre(Download)
 
from daguerre.adjustments import Fit
from daguerre.management.commands._daguerre_clean import Command as Clean
from daguerre.management.commands._daguerre_preadjust import (NO_ADJUSTMENTS,
    BAD_STRUCTURE, Command as Preadjust)
                                                 storage_path=adjusted,
                                                 adjusted=adjusted)
        clean = Clean()
        self.assertEqual(list(clean._old_adjustments()), [adjusted1])
        default_storage.delete(adjusted)
        area2 = Area.objects.create(storage_path=storage_path,
                                    **kwargs)
        clean = Clean()
        self.assertEqual(list(clean._old_areas()), [area1])
        default_storage.delete(storage_path)
                                                 storage_path=storage_path,
                                                 adjusted=storage_path)
        clean = Clean()
        self.assertEqual(list(clean._missing_adjustments()), [adjusted1])
        default_storage.delete(storage_path)
                                                 storage_path=path2,
                                                 adjusted=path1)
        clean = Clean()
        duplicates = clean._duplicate_adjustments()
        self.assertNotIn(adjusted3, duplicates)

src/d/j/django-daguerre-2.1.1/daguerre/tests/unit/test_management.py   django-daguerre(Download)
 
from daguerre.adjustments import Fit
from daguerre.management.commands._daguerre_clean import Command as Clean
from daguerre.management.commands._daguerre_preadjust import (NO_ADJUSTMENTS,
    BAD_STRUCTURE, Command as Preadjust)
                                                 storage_path=adjusted,
                                                 adjusted=adjusted)
        clean = Clean()
        self.assertEqual(list(clean._old_adjustments()), [adjusted1])
        default_storage.delete(adjusted)
        area2 = Area.objects.create(storage_path=storage_path,
                                    **kwargs)
        clean = Clean()
        self.assertEqual(list(clean._old_areas()), [area1])
        default_storage.delete(storage_path)
                                                 storage_path=storage_path,
                                                 adjusted=storage_path)
        clean = Clean()
        self.assertEqual(list(clean._missing_adjustments()), [adjusted1])
        default_storage.delete(storage_path)
                                                 storage_path=path2,
                                                 adjusted=path1)
        clean = Clean()
        duplicates = clean._duplicate_adjustments()
        self.assertNotIn(adjusted3, duplicates)