Пример #1
0
    def test_scenario2(self):
        """
            Scenario: Successfully associating resources to an existing project:
                Given I create a BigML source uploading train "<data>" file and associate it to a new project named "<project>" storing results in "<output_dir>"
                And I check that the project has been created
                And I check that the source has been created
                And I create a BigML source uploading train "<data>" file and associate it to the last created project id storing results in "<output_dir2>"
                Then the source is associated to the project

                Examples:
                | data             | project         | output_dir     | output_dir2
                | ../data/iris.csv | My new project  | ./scenario_p_2 | ./scenario_p_2_1
        """
        print self.test_scenario2.__doc__
        examples = [[
            'data/iris.csv', 'My new project', 'scenario_p_2', 'scenario_p_2_1'
        ]]
        for example in examples:
            print "\nTesting with:\n", example
            test_project.i_create_source_with_project(self,
                                                      data=example[0],
                                                      project=example[1],
                                                      output_dir=example[2])
            test_project.i_check_create_project(self)
            test_pred.i_check_create_source(self)
            test_project.i_create_source_with_project_id(self,
                                                         data=example[0],
                                                         output_dir=example[3])
            test_project.check_source_in_project(self)
Пример #2
0
    def test_scenario4(self):
        """
            Scenario: Successfully creating and updating project:
                Given I create a BigML project "<project>" and log results in "<output_dir>"
                And I check that the project has been created
                And I update the project params "<params>" to "<values>"
                And I check that the project has been updated
                Then the project params "<params>" are "<values>"

                Examples:
                | project         | output_dir       | params         | values
                | My new project  | ./scenario_p_4   | name, category | my_project_name, 1
        """
        print self.test_scenario4.__doc__
        examples = [[
            'My new project', 'scenario_p_4', ['name', 'category'],
            ['my_project_name', 1]
        ]]
        for example in examples:
            print "\nTesting with:\n", example
            test_project.i_create_project(self,
                                          project=example[0],
                                          output_dir=example[1])
            test_project.i_check_create_project(self)
            test_project.i_update_project(self,
                                          params=example[2],
                                          values=example[3])
            test_project.i_check_update_project(self)
            test_project.check_params_values(self,
                                             params=example[2],
                                             values=example[3])
Пример #3
0
    def test_scenario1(self):
        """
            Scenario: Successfully creating a project and associating resources to it:
                Given I create a BigML project in an organization named "<project>" storing results in "<output_dir>"
                And I create a BigML source uploading train "<data>" file and associate it to the organization project storing results in "<output_dir>"
                And I check that the project has been created
                And I check that the source has been created
                Then the source is associated to the project

                Examples:
                | data             | project         | output_dir
                | ../data/iris.csv | My new project  | ./scenario_org_1
        """
        print self.test_scenario1.__doc__
        examples = [['data/iris.csv', 'My new project', 'scenario_org_1']]
        for example in examples:
            print "\nTesting with:\n", example
            test_project.i_create_project_in_org(
                self,
                name=example[1],
                output_dir=example[2],
                organization=BIGML_ORGANIZATION)
            test_project.i_check_create_project(self, organization=True)
            test_project.i_create_source_with_org_project(
                self, data=example[0], output_dir=example[2])
            test_pred.i_check_create_source(self)
            test_project.check_source_in_project(self)
Пример #4
0
    def test_scenario1(self):
        """
            Scenario: Successfully creating a project and associating resources to it:
                Given I create a BigML source uploading train "<data>" file and associate it to a new project named "<project>" storing results in "<output_dir>"
                And I check that the project has been created
                And I check that the source has been created
                Then the source is associated to the project

                Examples:
                | data             | project         | output_dir
                | ../data/iris.csv | My new project  | ./scenario_p_1
        """
        print self.test_scenario1.__doc__
        examples = [
            ['data/iris.csv', 'My new project', 'scenario_p_1']]
        for example in examples:
            print "\nTesting with:\n", example
            test_project.i_create_source_with_project(self, data=example[0], project=example[1], output_dir=example[2])
            test_project.i_check_create_project(self)
            test_pred.i_check_create_source(self)
            test_project.check_source_in_project(self)
Пример #5
0
    def test_scenario4(self):
        """
            Scenario: Successfully creating and updating project:
                Given I create a BigML project "<project>" and log results in "<output_dir>"
                And I check that the project has been created
                And I update the project params "<params>" to "<values>"
                And I check that the project has been updated
                Then the project params "<params>" are "<values>"

                Examples:
                | project         | output_dir       | params         | values
                | My new project  | ./scenario_p_4   | name, category | my_project_name, 1
        """
        print self.test_scenario4.__doc__
        examples = [
            ['My new project', 'scenario_p_4', ['name', 'category'], ['my_project_name', 1]]]
        for example in examples:
            print "\nTesting with:\n", example
            test_project.i_create_project(self, project=example[0], output_dir=example[1])
            test_project.i_check_create_project(self)
            test_project.i_update_project(self, params=example[2], values=example[3])
            test_project.i_check_update_project(self)
            test_project.check_params_values(self, params=example[2], values=example[3])