def create_section(self, **kwargs):
        defaults = {
            'name': self.get_random_string(),
            'slug': self.get_random_string(),
            'pattern': '^/',
        }
        defaults.update(kwargs)
        return Section.objects.create(**defaults)
Factory method for creating Sections.
dataset/ETHPy150Open mlavin/django-ad-code/adcode/tests/base.py/AdCodeDataTestCase.create_section