예제 #1
0
    def test_data_types(self, collection_mock):
        get_mock = MagicMock(**{'get.return_value': DATA_SAMPLE[0]})
        api_mock = MagicMock(**{'data.return_value': get_mock})
        collection_mock.configure_mock(data=[1, 2], resolwe=MagicMock(api=api_mock))

        types = BaseCollection.data_types(collection_mock)
        self.assertEqual(types, [u'data:reads:fastq:single:'])
예제 #2
0
    def test_data_types(self, collection_mock):
        payload = {
            'id': 123,
            'process_type': 'data:reads:fastq:single:',
            # ...
        }
        get_mock = MagicMock(**{'get.return_value': payload})
        api_mock = MagicMock(**{'data.return_value': get_mock})
        collection_mock.configure_mock(data=[1, 2], resolwe=MagicMock(api=api_mock))

        types = BaseCollection.data_types(collection_mock)
        self.assertEqual(types, ['data:reads:fastq:single:'])
예제 #3
0
    def test_data_types(self, collection_mock):
        api_mock = MagicMock(**{'data.return_value': MagicMock(**{'get.return_value': DATA_SAMPLE[0]})})
        collection_mock.configure_mock(data=[1, 2], resolwe=MagicMock(api=api_mock))

        types = BaseCollection.data_types(collection_mock)
        self.assertEqual(types, [u'data:reads:fastq:single:'])