Esempio n. 1
0
    def test_create_multiple_organization_method(self):
        org_list = Organization.create_multiple_organizations(3)

        # Check number of orgs created
        self.assertEqual(len(Organization.objects.all()), 3)

        # Check their names
        self.assertEqual(org_list[0].name, 'org-1')
        self.assertEqual(org_list[1].name, 'org-2')
        self.assertEqual(org_list[2].name, 'org-3')
Esempio n. 2
0
    def test_create_multiple_organization_method(self):
        org_list = Organization.create_multiple_organizations(3)

        # Check number of orgs created
        self.assertEqual(len(Organization.objects.all()), 3)

        # Check their names
        self.assertEqual(org_list[0].name, 'org-1')
        self.assertEqual(org_list[1].name, 'org-2')
        self.assertEqual(org_list[2].name, 'org-3')
Esempio n. 3
0
    def test_create_multiple_organization_method(self):
        """
        Test creation of multiple organization using fake factory function.
        """
        org_list = Organization.create_multiple_organizations(3)

        # Check number of orgs created
        self.assertEqual(len(Organization.objects.all()), 3)

        # Check their names
        self.assertEqual(org_list[0].name, 'org-1')
        self.assertEqual(org_list[1].name, 'org-2')
        self.assertEqual(org_list[2].name, 'org-3')