コード例 #1
0
 def test_auto_slug(self):
     name = 'Mile High Connects'
     organization = Organization()
     organization.save()
     organization_translation = OrganizationTranslation(name=name, organization=organization)
     organization_translation.save()
     self.assertEqual(organization.slug, slugify(name))
コード例 #2
0
 def _create_organization(self, name, language):
     org = Organization()
     org.save()
     trans = OrganizationTranslation(name=name, language=language,
         organization=org)
     trans.save()
     return org