def test_create_transfer_with_new_category(self, context, test_org):
        """
        <b>Description:</b>
        Check that transfer can be created from an url with custom category.

        <b>Input data:</b>
        1. organization id
        2. custom category name
        3. url with a source file

        <b>Expected results:</b>
        Transfer is successfully created with custom category.

        <b>Steps:</b>
        1. Create transfer with custom category.
        2. Retrieve transfer from list.
        3. Check that retrieved transfer has a custom category.
        """
        new_category = "user_category"
        transfer = self._create_transfer(context,
                                         category=new_category,
                                         org_guid=test_org.guid)
        step("Get transfer and check it's category")
        retrieved_transfer = Transfer.api_get(transfer.id)
        assert retrieved_transfer.category == new_category, "Created transfer has different category"
Exemple #2
0
 def test_create_transfer_with_new_category(self, context, test_org):
     new_category = "user_category"
     transfer = self._create_transfer(context,
                                      category=new_category,
                                      org_guid=test_org.guid)
     step("Get transfer and check it's category")
     retrieved_transfer = Transfer.api_get(transfer.id)
     assert retrieved_transfer.category == new_category, "Created transfer has different category"
Exemple #3
0
 def test_submit_transfer(self, context, test_org):
     transfer = self._create_transfer(context,
                                      category=self.DEFAULT_CATEGORY,
                                      org_guid=test_org.guid)
     step(
         "Get transfers and check if they are the same as the uploaded ones"
     )
     retrieved_transfer = Transfer.api_get(transfer.id)
     assert transfer == retrieved_transfer, "The transfer is not the same"
    def test_submit_and_delete_transfer(self, context, test_org):
        """
        <b>Description:</b>
        Check transfer creation from an url and deletion. Also check dataset deletion.

        <b>Input data:</b>
        1. organization guid
        2. transfer category
        3. url with a source file

        <b>Expected results:</b>
        Transfer is successfully created and deleted. Dataset is successfully deleted.

        <b>Steps:</b>
        1. Create transfer.
        2. Retrieve corresponding dataset,
        3. Delete transfer.
        4. Check that transfer disappeared from the transfer list.
        5. Delete dataset.
        6. Check that dataset disappeared from the dataset list.
        """
        transfer = self._create_transfer(context,
                                         category=self.DEFAULT_CATEGORY,
                                         org_guid=test_org.guid)
        step(
            "Get transfers and check if they are the same as the uploaded ones"
        )
        retrieved_transfer = Transfer.api_get(transfer.id)
        assert transfer == retrieved_transfer, "The transfer is not the same"
        dataset = DataSet.api_get_matching_to_transfer(
            org_guid=test_org.guid, transfer_title=transfer.title)
        TestSubmitTransfer.check_transfer_and_dataset_are_visible_in_test_org(
            transfer=transfer, dataset=dataset, test_org=test_org)
        step("Delete transfer")
        transfer.cleanup()
        step("Check transfer is not visible on list of transfers")
        transfers = Transfer.api_get_list(org_guid_list=[test_org.guid])
        assert transfer not in transfers
        step("Delete dataset")
        dataset.cleanup()
        step("Check dataset is not visible on list of datasets")
        datasets = DataSet.api_get_list(org_guid_list=[test_org.guid])
        assert dataset not in datasets