def test_scenario5(self): """ Scenario: Successfully creating a centroid and the associated dataset: Given I create a data source uploading a "<data>" file And I wait until the source is ready less than <time_1> secs And I create a dataset And I wait until the dataset is ready less than <time_2> secs And I create a cluster And I wait until the cluster is ready less than <time_3> secs When I create a centroid for "<data_input>" And I check the centroid is ok Then the centroid is "<centroid>" And I create a dataset from the cluster and the centroid And I wait until the dataset is ready less than <time_2> secs And I check that the dataset is created for the cluster and the centroid Examples: | data | time_1 | time_2 | time_3 | data_input | centroid | | ../data/diabetes.csv | 10 | 20 | 20 | {"pregnancies": 0, "plasma glucose": 118, "blood pressure": 84, "triceps skin thickness": 47, "insulin": 230, "bmi": 45.8, "diabetes pedigree": 0.551, "age": 31, "diabetes": "true"} | Cluster 3 | """ print self.test_scenario5.__doc__ examples = [ ['data/diabetes.csv', '10', '20', '20', '{"pregnancies": 0, "plasma glucose": 118, "blood pressure": 84, "triceps skin thickness": 47, "insulin": 230, "bmi": 45.8, "diabetes pedigree": 0.551, "age": 31, "diabetes": "true"}', 'Cluster 3']] for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file(self, example[0]) source_create.the_source_is_finished(self, example[1]) dataset_create.i_create_a_dataset(self) dataset_create.the_dataset_is_finished_in_less_than(self, example[2]) cluster_create.i_create_a_cluster(self) cluster_create.the_cluster_is_finished_in_less_than(self, example[3]) prediction_create.i_create_a_centroid(self, example[4]) prediction_create.the_centroid_is(self, example[5])
def test_scenario5(self): """ Scenario: Successfully creating a centroid and the associated dataset: Given I create a data source uploading a "<data>" file And I wait until the source is ready less than <time_1> secs And I create a dataset And I wait until the dataset is ready less than <time_2> secs And I create a cluster And I wait until the cluster is ready less than <time_3> secs When I create a centroid for "<data_input>" And I check the centroid is ok Then the centroid is "<centroid>" And I create a dataset from the cluster and the centroid And I wait until the dataset is ready less than <time_2> secs And I check that the dataset is created for the cluster and the centroid Examples: | data | time_1 | time_2 | time_3 | data_input | centroid | | ../data/diabetes.csv | 10 | 20 | 20 | {"pregnancies": 0, "plasma glucose": 118, "blood pressure": 84, "triceps skin thickness": 47, "insulin": 230, "bmi": 45.8, "diabetes pedigree": 0.551, "age": 31, "diabetes": "true"} | Cluster 6 | """ print self.test_scenario5.__doc__ examples = [ ['data/diabetes.csv', '10', '20', '20', '{"pregnancies": 0, "plasma glucose": 118, "blood pressure": 84, "triceps skin thickness": 47, "insulin": 230, "bmi": 45.8, "diabetes pedigree": 0.551, "age": 31, "diabetes": "true"}', 'Cluster 5']] for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file(self, example[0]) source_create.the_source_is_finished(self, example[1]) dataset_create.i_create_a_dataset(self) dataset_create.the_dataset_is_finished_in_less_than(self, example[2]) cluster_create.i_create_a_cluster(self) cluster_create.the_cluster_is_finished_in_less_than(self, example[3]) prediction_create.i_create_a_centroid(self, example[4]) prediction_create.the_centroid_is(self, example[5])