def setup_module(module): db.execute( text(f""" INSERT INTO securities (id, name, ticker, english_name, market_id) VALUES (314,"삼성전자", "005930", "SamsungElectronics", 1) """)) db.execute( text(f""" INSERT INTO securities (id, name, ticker, english_name, market_id) VALUES (51,"삼성화재", "000810", "SamsungFire&MarineInsurance", 1) """))
def setup_module(module): ## Test data creation db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute(text(f"""INSERT INTO securities (id, market_id, ticker, name) VALUES('500', '1', '014820', '템즈')""")) db.execute(text(f"""INSERT INTO short_outstanding_percentages (security_id, date, short_outstanding_percentage, floating_shares, short_outstanding_shares) VALUES ('500', '2016-07-04', "100.00", "100.0000", "100.00")""")) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))
def setup_module(module): ## Test data creation db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute( text(f"""INSERT INTO securities (id, market_id, ticker, name) VALUES('500', '1', '014820', '동원시스템즈')""")) db.execute( text(f"""INSERT INTO short_volume_percentages ( security_id, date, short_volume_percentage, short_volume, trading_volume ) VALUES (500, '2016-07-04', '50.00', '50.0000', '50.0000')""" )) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))
def setup_module(module): ## Test data creation db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute( text(f""" INSERT INTO securities (id, market_id, ticker, name) VALUES('631', '1', '035420', 'NAVER')""")) db.execute( text(f""" INSERT INTO days_to_covers (security_id, date, days_to_cover_in_shares, short_outstanding_shares, twenty_days_moving_average_trading_volume, days_to_cover_in_amount, short_outstanding_amount, twenty_days_moving_average_trading_amount) VALUES (631, "2016-06-30", "0.35", "45035.0000", "126984.0000", "0.35", "31974850000.0000", "90774005550.0000" )""" )) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))
def setup_module(module): ## Test data creation db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute(text(f"""INSERT INTO securities (id, market_id, ticker, name) VALUES('500', '1', '014820', '동원시스템즈')""")) db.execute(text(f"""INSERT INTO loan_utilization_percentages (security_id, date, loan_utilization_percentage, loan_outstanding_shares, floating_shares, loan_utilization_percentage_shares, loan_utilization_percentage_amount, all_outstanding_shares, prev_valid_free_floats, prev_valid_outstanding_shares, market_cap, loan_outstanding_amount) VALUES (500, '2016-07-04', "100.00", "100.0000", "100.0000", "100.00", "100.00", "100.0000", "100.0000", "100.0000", "100.0000", "100.0000")""")) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))
def teardown_module(module): ## Test data clean up db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute(text("TRUNCATE securities")) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))
def teardown_module(module): ## Test data clean up db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute(text("TRUNCATE short_outstanding_percentages")) db.execute(text("TRUNCATE securities")) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))
def setup_module(module): ## Test data creation db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute( text(f""" INSERT INTO securities (id, market_id, ticker, name) VALUES(631, '1', '035420', 'NAVER')""")) db.execute( text(f""" INSERT INTO days_to_covers (security_id, date, days_to_cover_in_shares, short_outstanding_shares, twenty_days_moving_average_trading_volume, days_to_cover_in_amount, short_outstanding_amount, twenty_days_moving_average_trading_amount) VALUES (631, "2016-07-04", "0.39", "49425.0000", "127226.0000", "0.39", "35931975000.0000", "91136813750.0000" )""" )) db.execute( text(f""" INSERT INTO days_to_covers (security_id, date, days_to_cover_in_shares, short_outstanding_shares, twenty_days_moving_average_trading_volume, days_to_cover_in_amount, short_outstanding_amount, twenty_days_moving_average_trading_amount) VALUES (631, "2016-07-05", "0.32", "41314.0000", "128596.2500", "0.34", "30985500000.0000", "92378772400.0000" )""" )) db.execute( text(f""" INSERT INTO days_to_covers (security_id, date, days_to_cover_in_shares, short_outstanding_shares, twenty_days_moving_average_trading_volume, days_to_cover_in_amount, short_outstanding_amount, twenty_days_moving_average_trading_amount) VALUES (631, "2016-07-06", "0.31", "40332.0000", "129156.6500", "0.32", "30047340000.00000", "92924194100.0000" )""" )) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))
def teardown_module(module): ## Test data clean up db.execute(text("SET FOREIGN_KEY_CHECKS=0")) db.execute(text("TRUNCATE loan_utilization_percentages")) db.execute(text("TRUNCATE securities")) db.execute(text("SET FOREIGN_KEY_CHECKS=1"))