예제 #1
0
def test_dao_db_create_program_bad_db_name(test_configuration):
    """ db_create_program() should return True on failure. """
    DUT = DAO()
    _database = (test_configuration.RAMSTK_BACKEND + ':/' + TEMPDIR +
                 '/_ramstk_program_db.ramstk')

    assert DUT.db_create_program(_database)
예제 #2
0
def test_dao_db_create_program(test_configuration):
    """ db_create_program() should return False on success. """
    # Remove test program database from earlier runs if there is one.
    if os.path.exists(TEMPDIR + '/_ramstk_program_db.ramstk'):
        os.remove(TEMPDIR + '/_ramstk_program_db.ramstk')

    DUT = DAO()
    _database = (test_configuration.RAMSTK_BACKEND + ':///' + TEMPDIR +
                 '/_ramstk_program_db.ramstk')

    assert not DUT.db_create_program(_database)