Ejemplo n.º 1
0
def test_us03_03():
    execute_test('us03_03.ged', conn)
    assert user_story_03.get_rows(conn) == [
        ('US03_T03_I01', '2000-01-01', '1990-01-01'),
        ('US03_T03_I02', '2000-01-01', '1990-01-01'),
        ('US03_T03_I03', '2000-01-01', '1990-01-01')
    ]
Ejemplo n.º 2
0
def test_us02_04():
    execute_test('us02_04.ged', conn)
    assert user_story_02.get_rows(conn) == [
        ('US02_T04_I01', '2000-01-01', '1000-01-01'),
        ('US02_T04_I02', '2000-01-01', '1000-01-01'),
        ('US02_T04_I03', '2000-01-01', '1000-01-01')
    ]
Ejemplo n.º 3
0
def test_us05_05():
    execute_test('us05_05.ged', conn)
    assert user_story_05.get_rows(conn) == [
        ('US05_T05_I02', '2000-01-01', '1990-01-01'),
        ('US05_T05_I04', '2000-01-01', '1990-01-01'),
        ('US05_T05_I06', '2000-01-01', '1990-01-01')
    ]
Ejemplo n.º 4
0
def main():
    #set up the database
    conn = sqlite3.connect('megatron.db')
    reset_db(conn)

    #fill the database with our entire test suite as one file first
    execute_test('optimus_prime.ged', conn)

    #instantiate all of our tests and fire them
    stories = []
    stories.append(us01.UserStory01())
    stories.append(us02.UserStory02())
    stories.append(us03.UserStory03())
    stories.append(us04.UserStory04())
    stories.append(us05.UserStory05())
    stories.append(us06.UserStory06())
    stories.append(us07.UserStory07())
    stories.append(us08.UserStory08())
    stories.append(us09.UserStory09())
    stories.append(us10.UserStory10())
    stories.append(us12.UserStory12())
    stories.append(us13.UserStory13())
    stories.append(us15.UserStory15())
    stories.append(us16.UserStory16())
    stories.append(us18.UserStory18())
    stories.append(us21.UserStory21())
    stories.append(us23.UserStory23())
    stories.append(us24.UserStory24())
    stories.append(us27.UserStory27())
    stories.append(us28.UserStory28())
    stories.append(us29.UserStory29())
    stories.append(us30.UserStory30())
    stories.append(us31.UserStory31())
    stories.append(us32.UserStory32())
    stories.append(us33.UserStory33())
    stories.append(us34.UserStory34())
    stories.append(us35.UserStory35())
    stories.append(us36.UserStory36())
    stories.append(us38.UserStory38())
    stories.append(us39.UserStory39())
    stories.append(us41.UserStory41())
    stories.append(us42.UserStory42())

    for story in stories:
        story.fire(conn)
Ejemplo n.º 5
0
def test_us31_02():
    execute_test('us31_02.ged', conn)
    assert user_story_31.get_rows(conn) == [('US31_T02_I01', '58'),
                                            ('US31_T02_I02', '58')]
Ejemplo n.º 6
0
def test_us39_06():
    execute_test('us39_06.ged', conn)
    assert user_story_39.get_rows(conn) == []
Ejemplo n.º 7
0
def test_us09_02():
    execute_test('us09_02.ged', conn)
    assert user_story_09.get_rows(conn) == [('US09_T02_F01', 'US09_T02_I01',
                                             'US09_T02_I02', 'Husband')]
Ejemplo n.º 8
0
def test_us38_05():
    execute_test('us38_05.ged', conn)
    assert user_story_38.get_rows(conn) == [('US38_T05_I01', '2000-12-05')]
Ejemplo n.º 9
0
def test_us35_02():
    execute_test('us35_02.ged', conn)
    assert user_story_35.get_rows(conn) == [('US35_T02_I01', '2018-11-01', '0')
                                            ]
Ejemplo n.º 10
0
def test_us12_03():
    execute_test('us12_03.ged', conn)
    assert user_story_12.get_rows(conn) == [('US12_T03_I02', 'US12_T03_I03')]
Ejemplo n.º 11
0
def test_us12_04():
    execute_test('us12_04.ged', conn)
    assert user_story_12.get_rows(conn) == [('US12_T04_I02', 'US12_T04_I03'),
                                            ('US12_T04_I02', 'US12_T04_I04'),
                                            ('US12_T04_I02', 'US12_T04_I05')]
Ejemplo n.º 12
0
def test_us30_03():
    execute_test('us30_03.ged', conn)
    assert user_story_30.get_rows(conn) == [('US30_T03_I01', ),('US30_T03_I02', )]
Ejemplo n.º 13
0
def test_us12_02():
    execute_test('us12_02.ged', conn)
    assert user_story_12.get_rows(conn) == []
Ejemplo n.º 14
0
def test_us30_02():
    execute_test('us30_02.ged', conn)
    assert user_story_30.get_rows(conn) == [('US30_T02_I01', )]
Ejemplo n.º 15
0
def test_us09_05():
    execute_test('us09_05.ged', conn)
    assert user_story_09.get_rows(conn) == [
        ('US09_T05_F01', 'US09_T05_I01', 'US09_T05_I03', 'Husband'),
        ('US09_T05_F01', 'US09_T05_I01', 'US09_T05_I02', 'Wife')
    ]
Ejemplo n.º 16
0
def test_us09_04():
    execute_test('us09_04.ged', conn)
    assert user_story_09.get_rows(conn) == [('US09_T04_F01', 'US09_T04_I01',
                                             'US09_T04_I02', 'Wife')]
Ejemplo n.º 17
0
def test_us31_05():
    execute_test('us31_05.ged', conn)
    assert user_story_31.get_rows(conn) == []
Ejemplo n.º 18
0
def test_us28_02():
    execute_test('us28_02.ged', conn)
    assert user_story_28.get_rows(conn) == ['US28_T02_I01 (28)']
Ejemplo n.º 19
0
def test_us38_01():
    execute_test('us38_01.ged', conn)
    assert user_story_38.get_rows(conn) == []
Ejemplo n.º 20
0
def test_us28_03():
    execute_test('us28_03.ged', conn)
    assert user_story_28.get_rows(conn) == [
        'US28_T03_I01 (28), US28_T03_I02 (27)',
        'US28_T03_I03 (28), US28_T03_I04 (27)'
    ]
Ejemplo n.º 21
0
def test_US41_03():
    execute_test('us41_03.ged', conn)
    assert user_story_41.get_rows(conn) == [('1990-01-01')]
Ejemplo n.º 22
0
def test_us03_04():
    execute_test('us03_04.ged', conn)
    assert user_story_03.get_rows(conn) == []
Ejemplo n.º 23
0
def test_us35_03():
    execute_test('us35_03.ged', conn)
    assert user_story_35.get_rows(conn) == []
Ejemplo n.º 24
0
def test_us34_07():
    execute_test('us34_07.ged',conn)
    assert user_story_34.get_rows(conn) == [('US34_T07_I01','10','US34_T07_I02','50')]
Ejemplo n.º 25
0
def test_us28_05():
    execute_test('us28_05.ged', conn)
    assert user_story_28.get_rows(conn) == ['']
Ejemplo n.º 26
0
def test_us23_04():
    execute_test('us23_04.ged', conn)
    assert user_story_23.get_rows(conn) == [('US23_T04_I01', 'US23_T04_I02'),
                                            ('US23_T04_I01', 'US23_T04_I03'),
                                            ('US23_T04_I02', 'US23_T04_I03')]
Ejemplo n.º 27
0
def test_us34_06():
    execute_test('us34_06.ged',conn)
    assert user_story_34.get_rows(conn) == [('US34_T06_I01', '10', 'US34_T06_I02','50'),('US34_T06_I03', '50','US34_T06_I04','10')]
Ejemplo n.º 28
0
def test_us28_01():
    execute_test('us28_01.ged', conn)
    assert user_story_28.get_rows(conn) == [
        'US28_T01_I01 (28), US28_T01_I02 (27)'
    ]
Ejemplo n.º 29
0
def test_us34_08():
    execute_test('us34_08.ged',conn)
    assert user_story_34.get_rows(conn) == []
Ejemplo n.º 30
0
def test_us39_01():
    execute_test('us39_01.ged', conn)
    assert user_story_39.get_rows(conn) == [('US39_T01_F01', '2000-12-05')]