fpdb/pyfpdb/test_Betfair.py

35 lines
1.0 KiB
Python
Raw Normal View History

2009-03-12 12:01:41 +01:00
# -*- coding: utf-8 -*-
import BetfairToFpdb
from Hand import *
2009-03-12 12:01:41 +01:00
import py
import Configuration
import Database
import SQL
import fpdb_import
2009-03-12 12:01:41 +01:00
config = Configuration.Config(file = "HUD_config.test.xml")
db = Database.Database(config)
sql = SQL.Sql(db_server = 'sqlite')
2009-03-12 12:01:41 +01:00
settings = {}
settings.update(config.get_db_parameters())
settings.update(config.get_tv_parameters())
settings.update(config.get_import_parameters())
settings.update(config.get_default_paths())
2009-03-12 12:01:41 +01:00
def testFlopImport():
db.recreate_tables()
importer = fpdb_import.Importer(False, settings, config)
importer.setDropIndexes("don't drop")
importer.setFailOnError(True)
importer.setThreads(-1)
importer.addBulkImportImportFileOrDir(
"""regression-test-files/cash/Betfair/Flop/PLO-6max-USD-0.05-0.10-200909.All.in.river.splitpot.txt""", site="Betfair")
importer.setCallHud(False)
(stored, dups, partial, errs, ttime) = importer.runImport()
importer.clearFileList()
# Should actually do some testing here
assert 1 == 1