コード例 #1
0
def test_exp_update(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    for key, doc, uuid_val in experiment_design.UPDATES:
        resp = base.add_update_document(doc, uuid=uuid_val)
        assert resp['uuid'] == uuid_val
コード例 #2
0
def test_exp_delete(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    for key, doc, uuid_val in experiment_design.DELETES:
        resp = base.delete_document(uuid_val)
        assert resp.raw_result == {'n': 1, 'ok': 1.0}
コード例 #3
0
def test_exp_issue_uuid(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    identifier_string = 'MILLER_UREY_REDUX'
    identifier_string_uuid = base.get_typeduuid(identifier_string,
                                                binary=False)
    assert identifier_string_uuid == '11439d1c-3068-57f5-9b1d-4f61a97eefa7'
コード例 #4
0
def test_exp_add(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    for key, doc, uuid_val in experiment_design.CREATES:
        resp = base.add_update_document(doc)
        assert resp['uuid'] is not None
コード例 #5
0
def test_exp_uuid_tytpe(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    assert base.get_uuid_type() == 'experiment_design'
コード例 #6
0
def test_exp_name(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    assert base.name == 'experiment_designs'
コード例 #7
0
def test_exp_schema(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    assert isinstance(base.schema, dict)
コード例 #8
0
def test_exp_db_heritable_schema(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    assert 'experiment_design_id' in base.get_indexes()
    assert 'title' not in base.get_indexes()
コード例 #9
0
def test_exp_db_init(mongodb_settings):
    base = ExperimentDesignStore(mongodb_settings)
    assert base is not None