コード例 #1
0
    def __set_prefix_item(self):
        """Get the prefix details.

        Returns:
            prefix item or None if prefix does not exist
        """
        self.prefix_item = get_prefix_item(self.prefix)
コード例 #2
0
ファイル: test_helpers.py プロジェクト: sanger/baracoda
def test_correct_prefix_item_is_returned(app, prefixes):
    with app.app_context():
        prefix_item = get_prefix_item("LEED")
        assert prefix_item == {
            "prefix": "LEED",
            "sequence_name": "heron",
            "formatter_class": HeronCogUkIdFormatter,
            "enableChildrenCreation": False,
        }
コード例 #3
0
def test_correct_prefix_obj_is_created(app, prefixes):
    with app.app_context():
        barcode_operations = BarcodeOperations(prefix="LEED")
        assert barcode_operations.prefix_item == get_prefix_item("LEED")
コード例 #4
0
ファイル: test_helpers.py プロジェクト: sanger/baracoda
def test_none_is_returned_for_invalid_prefix(app):
    with app.app_context():
        prefix_item = get_prefix_item("MOON")
        assert prefix_item is None
コード例 #5
0
ファイル: test_helpers.py プロジェクト: BenTopping/baracoda
def test_correct_prefix_item_is_returned(app, prefixes):
  with app.app_context():
    prefix_item = get_prefix_item("LEED")
    assert prefix_item == {"prefix": "LEED", "sequence_name": "heron", "convert": True}