class AccessionNumberMapperTest(unittest.TestCase):
    """
    Tests for `AccessionNumberMapper`.
    """
    _ACCESSION_NUMBERS = ["test_accession_number1", "test_accession_number2", "test_accession_number3"]

    def setUp(self):
        self._mapper = MockAccessionNumberMapper()

    def test_get_by_accession_number_with_value(self):
        self._mapper.get_by_accession_number(AccessionNumberMapperTest._ACCESSION_NUMBERS[0])
        self._mapper.get_by_property_value(Property.NAME, AccessionNumberMapperTest._ACCESSION_NUMBERS[0])

    def test_get_by_accession_number_with_list(self):
        self._mapper.get_by_accession_number(AccessionNumberMapperTest._ACCESSION_NUMBERS)
        self._mapper._get_by_property_value_sequence(
            Property.ACCESSION_NUMBER, AccessionNumberMapperTest._ACCESSION_NUMBERS)
Esempio n. 2
0
class AccessionNumberMapperTest(unittest.TestCase):
    """
    Tests for `AccessionNumberMapper`.
    """
    _ACCESSION_NUMBERS = [
        "test_accession_number1", "test_accession_number2",
        "test_accession_number3"
    ]

    def setUp(self):
        self._mapper = MockAccessionNumberMapper()

    def test_get_by_accession_number_with_value(self):
        self._mapper.get_by_accession_number(
            AccessionNumberMapperTest._ACCESSION_NUMBERS[0])
        self._mapper.get_by_property_value(
            Property.NAME, AccessionNumberMapperTest._ACCESSION_NUMBERS[0])

    def test_get_by_accession_number_with_list(self):
        self._mapper.get_by_accession_number(
            AccessionNumberMapperTest._ACCESSION_NUMBERS)
        self._mapper._get_by_property_value_sequence(
            Property.ACCESSION_NUMBER,
            AccessionNumberMapperTest._ACCESSION_NUMBERS)
 def setUp(self):
     self._mapper = MockAccessionNumberMapper()
Esempio n. 4
0
 def setUp(self):
     self._mapper = MockAccessionNumberMapper()