예제 #1
0
def test_mimir_ntfs_false(create_instance, enable_mimir2):
    with app.app_context():
        instance = models.Instance.query.get(create_instance)
        instance.import_ntfs_in_mimir = False
        actions = []
        actions.extend(tasks.send_to_mimir(instance, 'test.poi', 'poi'))
        assert actions == []
예제 #2
0
def test_mimir_family_type_poi(create_instance, enable_mimir2):
    with app.app_context():
        instance = models.Instance.query.get(create_instance)
        actions = []
        actions.extend(tasks.send_to_mimir(instance, 'test.poi', 'poi'))
        assert actions[0].task == 'tyr.binarisation.poi2mimir'
        assert actions[0].args[1] == 'test.poi'
        assert len(actions) == 2  # poi2mimir + finish
예제 #3
0
def test_mimir_family_type_poi_mimir_disabled(create_instance, disable_mimir):
    with app.app_context():
        instance = models.Instance.query.get(create_instance)
        actions = []
        actions.extend(tasks.send_to_mimir(instance, 'test.poi', 'poi'))
        assert len(actions) == 0
예제 #4
0
def test_mimir_family_type_not_applicable(create_instance, enable_mimir2):
    with app.app_context():
        instance = models.Instance.query.get(create_instance)
        actions = []
        actions.extend(tasks.send_to_mimir(instance, 'test.poi', 'dt'))
        assert actions == []