From 525c3fa1923bd6c98cbcc9ec1d062fb43eba22fc Mon Sep 17 00:00:00 2001 From: baztian Date: Wed, 26 Jan 2011 13:47:58 +0100 Subject: [PATCH] Translated test data to english --- src/test/data/create.sql | 12 ++++++------ src/test/data/insert.sql | 4 ++-- src/test/integration_test.py | 21 +++++++++++---------- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/test/data/create.sql b/src/test/data/create.sql index 668d9f8..63b7a17 100644 --- a/src/test/data/create.sql +++ b/src/test/data/create.sql @@ -1,8 +1,8 @@ -create table konto ( -"KONTO_ID" TIMESTAMP default CURRENT_TIMESTAMP not null, -"KONTO_NR" INTEGER not null, -"SALDO" DECIMAL default 0.0 not null, -"SPERRE" DECIMAL, -primary key ("KONTO_ID") +create table Account ( +"ACCOUNT_ID" TIMESTAMP default CURRENT_TIMESTAMP not null, +"ACCOUNT_NO" INTEGER not null, +"BALANCE" DECIMAL default 0.0 not null, +"BLOCKING" DECIMAL, +primary key ("ACCOUNT_ID") ); diff --git a/src/test/data/insert.sql b/src/test/data/insert.sql index ed4e988..7783390 100644 --- a/src/test/data/insert.sql +++ b/src/test/data/insert.sql @@ -1,2 +1,2 @@ -insert into Konto values ('2009-09-10 14:15:22.123456', 18, 12.4, null); -insert into Konto values ('2009-09-11 14:15:22.123456', 19, 12.9, 1); +insert into ACCOUNT values ('2009-09-10 14:15:22.123456', 18, 12.4, null); +insert into ACCOUNT values ('2009-09-11 14:15:22.123456', 19, 12.9, 1); diff --git a/src/test/integration_test.py b/src/test/integration_test.py index 353be01..b555430 100644 --- a/src/test/integration_test.py +++ b/src/test/integration_test.py @@ -105,31 +105,31 @@ class IntegrationTest(TestCase): def tearDown(self): cursor = self.conn.cursor() - cursor.execute("drop table konto"); + cursor.execute("drop table ACCOUNT"); self.conn.close() def test_execute_and_fetch_no_data(self): cursor = self.conn.cursor() - stmt = "select * from konto where konto_id is null" + stmt = "select * from ACCOUNT where ACCOUNT_ID is null" cursor.execute(stmt) assert [] == cursor.fetchall() def test_execute_and_fetch(self): cursor = self.conn.cursor() - cursor.execute("select * from konto") + cursor.execute("select * from ACCOUNT") result = cursor.fetchall() assert [(u'2009-09-10 14:15:22.123456', 18, 12.4, None), (u'2009-09-11 14:15:22.123456', 19, 12.9, 1)] == result def test_execute_and_fetch_parameter(self): cursor = self.conn.cursor() - cursor.execute("select * from konto where konto_nr = ?", (18,)) + cursor.execute("select * from ACCOUNT where ACCOUNT_NO = ?", (18,)) result = cursor.fetchall() assert [(u'2009-09-10 14:15:22.123456', 18, 12.4, None)] == result def test_execute_and_fetchone(self): cursor = self.conn.cursor() - cursor.execute("select * from konto order by konto_nr") + cursor.execute("select * from ACCOUNT order by ACCOUNT_NO") result = cursor.fetchone() assert (u'2009-09-10 14:15:22.123456', 18, 12.4, None) == result cursor.close() @@ -139,22 +139,22 @@ class IntegrationTest(TestCase): has been made via execute method. """ cursor = self.conn.cursor() - cursor.execute("select * from konto") + cursor.execute("select * from ACCOUNT") assert None != cursor.description cursor.fetchone() - cursor.execute("delete from konto") + cursor.execute("delete from ACCOUNT") assert None == cursor.description def test_execute_and_fetchone_after_end(self): cursor = self.conn.cursor() - cursor.execute("select * from konto where konto_nr = ?", (18,)) + cursor.execute("select * from ACCOUNT where ACCOUNT_NO = ?", (18,)) cursor.fetchone() result = cursor.fetchone() assert None is result def test_execute_and_fetchmany(self): cursor = self.conn.cursor() - cursor.execute("select * from konto order by konto_nr") + cursor.execute("select * from ACCOUNT order by ACCOUNT_NO") result = cursor.fetchmany() assert [(u'2009-09-10 14:15:22.123456', 18, 12.4, None)] == result # TODO: find out why this cursor has to be closed in order to @@ -163,7 +163,8 @@ class IntegrationTest(TestCase): def test_executemany(self): cursor = self.conn.cursor() - stmt = "insert into Konto (KONTO_ID, KONTO_NR, SALDO) values (?, ?, ?)" + stmt = "insert into ACCOUNT (ACCOUNT_ID, ACCOUNT_NO, BALANCE)" \ + " values (?, ?, ?)" parms = ( ( '2009-09-11 14:15:22.123450', 20, 13.1 ), ( '2009-09-11 14:15:22.123451', 21, 13.2 ),