def test_create_organization_creates_team_and_perms(self):
        # create a user - bob
        profile = tools.create_organization("modilabs", self.user)
        self.assertIsInstance(profile, OrganizationProfile)
        organization_profile = OrganizationProfile.objects.get(
            user__username="modilabs")

        # check organization was created
        self.assertTrue(organization_profile.is_organization)

        self.assertTrue(hasattr(profile, 'metadata'))

        # check that the default team was created
        team_name = Team.OWNER_TEAM_NAME % "modilabs#%s"
        team = Team.objects.get(
            organization=organization_profile.user, name=team_name)
        self.assertIsInstance(team, Team)
        self.assertIn(team.group_ptr, self.user.groups.all())
        self.assertTrue(self.user.has_perm('api.is_org_owner'))
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/apps/api/tests/models/test_organization_profile.py/TestOrganizationProfile.test_create_organization_creates_team_and_perms/swapped operands of `%`