def test_scenario1(self): """ Scenario: Successfully uploading source: Given I create a data source uploading a "<data>" file with args "<args>" And I wait until the source is ready less than <time_1> secs Then the source exists and has args "<args>" Examples: | data | time_1 | args | | ../data/iris.csv | 30 | {"tags": ["my tag", "my second tag"]} """ print self.test_scenario1.__doc__ examples = [ ['data/iris.csv', '30', '{"tags": ["my tag", "my second tag"]}']] for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file_with_args(self, example[0], example[2]) source_create.the_source_is_finished(self, example[1]) source_create.source_has_args(self, example[2])
def test_scenario1(self): """ Scenario: Successfully creating an external connector: Given I create an external connector from environment vars And I wait until the external connector is ready less than <time_1> secs And I update the external connector with args <args> And the external connector has arguments <args> And I create a source from the external connector id Then the source has arguments "<source_args>" Examples: | time_1 | args | | 20 | {"name": "my connector name" | """ print self.test_scenario1.__doc__ examples = [['20', '{"name": "my connector name"}', 20, 20]] for example in examples: print "\nTesting with:\n", example connector_create.i_create_external_connector(self) connector_create.the_external_connector_is_finished( self, example[0]) connector_create.i_update_external_connector_with(self, example[1]) connector_create.the_external_connector_is_finished( self, example[2]) connector_create.external_connector_has_args(example[1]) args = { "source": "postgresql", "externalconnector_id": world.external_connector["resource"][18:], "query": "SELECT * FROM rnacen.auth_group" } source_create.i_create_using_connector(self, \ {"source": "postgresql", "externalconnector_id": world.external_connector["resource"][18:], "query": "SELECT * FROM rnacen.auth_group"}) source_create.the_source_is_finished(self, example[3]) source_create.source_has_args(self, json.dumps({"external_data": args}))
def test_scenario1(self): """ Scenario: Successfully uploading source: Given I create a data source uploading a "<data>" file with args "<args>" And I wait until the source is ready less than <time_1> secs Then the source exists and has args "<args>" Examples: | data | time_1 | args | | ../data/iris.csv | 30 | {"tags": ["my tag", "my second tag"]} | ../data/iris.csv | 30 | {"name": "Testing unicode names: áé"}]} """ print self.test_scenario1.__doc__ examples = [ ['data/iris.csv', '30', '{"tags": ["my tag", "my second tag"]}'], ['data/iris.csv', '30', '{"name": "Testing unicode names: áé"}']] for example in examples: print "\nTesting with:\n", example source_create.i_upload_a_file_with_args(self, example[0], example[2]) source_create.the_source_is_finished(self, example[1]) source_create.source_has_args(self, example[2])