Example #1
0
 def test_positive_update_1(self, test_data):
     """
     @feature: Organizations
     @test: Create organization with valid values then update its name
     @assert: organization name is updated
     """
     org = Organization()
     org = ApiCrud.record_create(org)
     org.name = test_data.name
     ApiCrud.record_update(org)
Example #2
0
 def test_positive_update_1(self, test_data):
     """
     @feature: Organizations
     @test: Create organization with valid values then update its name
     @assert: organization name is updated
     """
     org = Organization()
     org = ApiCrud.record_create(org)
     org.name = test_data.name
     ApiCrud.record_update(org)
Example #3
0
    def test_positive_update_4(self, test_data):
        """
        @feature: Organizations
        @test: Create organization with valid values then update all values
        @assert: organization name, label and description are updated
        """
        org = Organization()
        org = ApiCrud.record_create(org)
        org.name = test_data.name
        org.description = test_data.description

        ApiCrud.record_update(org)
Example #4
0
    def test_negative_update_1(self, test_data):
        """
        @feature: Organizations
        @test: Create organization with valid values then fail to update
        its name
        @assert: organization name is not updated
        """
        org = Organization()
        org = ApiCrud.record_create(org)
        org.name = test_data.name
        correctly_failing = True
        try:
            ApiCrud.record_update(org)
            correctly_failing = False
        except ApiException:
            correctly_failing = correctly_failing and True

        self.assertTrue(correctly_failing)
Example #5
0
    def test_negative_update_1(self, test_data):
        """
        @feature: Organizations
        @test: Create organization with valid values then fail to update
        its name
        @assert: organization name is not updated
        """
        org = Organization()
        org = ApiCrud.record_create(org)
        org.name = test_data.name
        correctly_failing = True
        try:
            ApiCrud.record_update(org)
            correctly_failing = False
        except ApiException:
            correctly_failing = correctly_failing and True

        self.assertTrue(correctly_failing)