Ejemplo n.º 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)
Ejemplo n.º 2
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)
Ejemplo n.º 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)
Ejemplo n.º 4
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)
Ejemplo n.º 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)
Ejemplo n.º 6
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)
Ejemplo n.º 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)