Exemple #1
0
 def test_edit_organization_bogus_organization(self):
     """ Unit Test: test_edit_organization_bogus_organization """
     self.test_organization['id'] = 12345
     self.test_organization['name'] = 'bogus.organizationsßßß'
     with self.assertNumQueries(1):
         with self.assertRaises(exceptions.InvalidOrganizationException):
             api.edit_organization(self.test_organization)
     with self.assertNumQueries(0):
         with self.assertRaises(exceptions.InvalidOrganizationException):
             api.edit_organization(None)
 def test_edit_organization_bogus_organization(self):
     """ Unit Test: test_edit_organization_bogus_organization """
     self.test_organization['id'] = 12345
     self.test_organization['name'] = 'bogus.organizationsßßß'
     with self.assertNumQueries(1):
         with self.assertRaises(exceptions.InvalidOrganizationException):
             api.edit_organization(self.test_organization)
     with self.assertNumQueries(0):
         with self.assertRaises(exceptions.InvalidOrganizationException):
             api.edit_organization(None)
Exemple #3
0
    def test_edit_organization_invalid_data_throws_exceptions(self):
        """ Unit Test: test_edit_organization_invalid_data_throws_exceptions """
        self.test_organization['name'] = ''
        with self.assertNumQueries(0):
            with self.assertRaises(exceptions.InvalidOrganizationException):
                api.edit_organization(self.test_organization)

        self.test_organization['id'] = 0
        with self.assertNumQueries(0):
            with self.assertRaises(exceptions.InvalidOrganizationException):
                api.edit_organization(self.test_organization)
    def test_edit_organization_invalid_data_throws_exceptions(self):
        """ Unit Test: test_edit_organization_invalid_data_throws_exceptions """
        self.test_organization['name'] = ''
        with self.assertNumQueries(0):
            with self.assertRaises(exceptions.InvalidOrganizationException):
                api.edit_organization(self.test_organization)

        self.test_organization['id'] = 0
        with self.assertNumQueries(0):
            with self.assertRaises(exceptions.InvalidOrganizationException):
                api.edit_organization(self.test_organization)
Exemple #5
0
    def test_edit_organization(self):
        """ Unit Test: test_edit_organization"""
        self.test_organization['name'] = 'Edited Organizationßßß'

        with self.assertNumQueries(1):
            api.edit_organization(self.test_organization)
    def test_edit_organization(self):
        """ Unit Test: test_edit_organization"""
        self.test_organization['name'] = 'Edited Organizationßßß'

        with self.assertNumQueries(1):
            api.edit_organization(self.test_organization)
Exemple #7
0
    def test_edit_organization(self):
        """ Unit Test: test_edit_organization"""
        self.test_organization["name"] = "Edited Organizationßßß"

        with self.assertNumQueries(1):
            api.edit_organization(self.test_organization)