コード例 #1
0
 def populate_db_tables(self):
     execute_insert(db_filename, 'people',
         (101, 'Springfield', 'USA', '54321', 'OR', '123 Python St',
          '*****@*****.**', 'Homer', 'Simpson', 'Virgil'),
         (102, 'Springfield', 'USA', '54321', 'OR', '125 Python St',
          '*****@*****.**', 'Ned', 'Flanders', 'Micah'),
     )
コード例 #2
0
 def populate_db_tables(self):
     execute_insert(db_filename, 'people',
         (123, 'Chicago', 'USA', '34568', 'IL', '123 Cool St',
          '*****@*****.**', 'John', 'Coltrane', ''),
         (124, 'New Paltz', 'USA', '12345', 'NY', '123 Main St',
             '*****@*****.**', 'Mike', 'Woinoski', '')
     )
コード例 #3
0
ファイル: test_venue_dao.py プロジェクト: stekodyne/crs1906
 def populate_db_tables(self):
     execute_insert(db_filename, 'events',
         (201, '2015-12-31 20:00:00.000', 101, None),
         (202, '2016-01-01 20:00:00.000', 101, None),
         (203, '2015-12-31 21:00:00.000', 102, None),
         (204, '2015-12-25 10:00:00.000', 102, None)
     )
     execute_insert(db_filename, 'venues',
         (101, 'Chicago', 'USA', 41.8369, -87.6847, 'Auditorium Theatre',
          'IL', 'E Congress Pkwy, Chicago, IL 60605'),
         (102, 'New York', 'USA', 40.7127, -74.0059, 'Carnegie Hall',
          'NY', '881 7th Ave, New York, NY 10019')
     )
コード例 #4
0
 def populate_db_tables(self):
     execute_insert(
         db_filename, 'acts',
         (301, 'Beethoven and Brahms', 'Berlin Philharmonic', 1, 0),
         (302, 'Unplugged', 'Eric Clapton', 1, 0),
         (303, 'Gershwin Rhapsody in Blue', 'New York Philharmonic', 1, 0),
         (304, 'Sketches of Spain', 'Wynton Marsalis', 1, 0),
         (305, 'The Standard', 'Take 6', 1, 0))
     execute_insert(db_filename, 'acts_events', (301, 201), (301, 202),
                    (301, 203), (301, 204), (302, 201), (302, 202),
                    (303, 201), (304, 201), (305, 205))
     execute_insert(
         db_filename,
         'events',
         (201, '2015-12-31 20:00:00.000', 101, None),
         (202, '2016-01-01 20:00:00.000', 101, None),
         (203, '2015-12-31 21:00:00.000', 102, None),
         (204, '2015-12-25 10:00:00.000', 102, None),
         (205, '2016-01-01 10:00:00.000', 102, None),
     )
     execute_insert(
         db_filename, 'venues',
         (101, 'Chicago', 'USA', 41.8369, -87.6847, 'Auditorium Theatre',
          'IL', 'E Congress Pkwy, Chicago, IL 60605'),
         (102, 'New York', 'USA', 40.7127, -74.0059, 'Carnegie Hall', 'NY',
          '881 7th Ave, New York, NY 10019'))
コード例 #5
0
ファイル: test_act_dao.py プロジェクト: mwoinoski/crs1906
 def populate_db_tables(self):
     execute_insert(db_filename, 'acts',
         # id, notes, title, act_type, year
         (301, 'Beethoven and Brahms', 'Berlin Philharmonic', Act.MUSIC, 0),
         (302, 'Unplugged', 'Eric Clapton', Act.MUSIC, 0),
         (303, 'Gershwin Rhapsody in Blue', 'New York Philharmonic', Act.MUSIC, 0),
         (304, 'Sketches of Spain', 'Wynton Marsalis', Act.MUSIC, 0),
         (305, 'The History of Jazz', 'Wynton Marsalis', Act.MOVIE, 0)
     )
     execute_insert(db_filename, 'acts_events',
         (301, 201),
         (301, 202),
         (301, 203),
         (301, 204),
         (302, 201),
         (302, 202),
         (303, 201),
         (304, 201),
         (305, 205)
     )
     execute_insert(db_filename, 'events',
         (201, '2015-12-31 20:00:00.000', 101, None),
         (202, '2016-01-01 20:00:00.000', 101, None),
         (203, '2015-12-31 21:00:00.000', 102, None),
         (204, '2015-12-25 10:00:00.000', 102, None),
         (205, '2015-10-01 19:30:00.000', 103, None)
     )
     execute_insert(db_filename, 'venues',
         (101, 'Chicago', 'USA', 41.8369, -87.6847, 'Auditorium Theatre',
          'IL', 'E Congress Pkwy, Chicago, IL 60605'),
         (102, 'New York', 'USA', 40.7127, -74.0059, 'Carnegie Hall',
          'NY', '881 7th Ave, New York, NY 10019'),
         (103, 'Kingston', 'USA', 42.7127, -73.0059, 'Kingston Cinema 6',
          'NY', '1205 Ulster Ave, Kingston NY 12401')
     )
コード例 #6
0
ファイル: test_act_dao.py プロジェクト: stekodyne/crs1906
 def populate_db_tables(self):
     execute_insert(
         db_filename,
         'acts',
         # id, notes, title, act_type, year
         (301, 'Beethoven and Brahms', 'Berlin Philharmonic', Act.MUSIC, 0),
         (302, 'Unplugged', 'Eric Clapton', Act.MUSIC, 0),
         (303, 'Gershwin Rhapsody in Blue', 'New York Philharmonic',
          Act.MUSIC, 0),
         (304, 'Sketches of Spain', 'Wynton Marsalis', Act.MUSIC, 0),
         (305, 'The History of Jazz', 'Wynton Marsalis', Act.MOVIE, 0))
     execute_insert(db_filename, 'acts_events', (301, 201), (301, 202),
                    (301, 203), (301, 204), (302, 201), (302, 202),
                    (303, 201), (304, 201), (305, 205))
     execute_insert(db_filename, 'events',
                    (201, '2015-12-31 20:00:00.000', 101, None),
                    (202, '2016-01-01 20:00:00.000', 101, None),
                    (203, '2015-12-31 21:00:00.000', 102, None),
                    (204, '2015-12-25 10:00:00.000', 102, None),
                    (205, '2015-10-01 19:30:00.000', 103, None))
     execute_insert(
         db_filename, 'venues',
         (101, 'Chicago', 'USA', 41.8369, -87.6847, 'Auditorium Theatre',
          'IL', 'E Congress Pkwy, Chicago, IL 60605'),
         (102, 'New York', 'USA', 40.7127, -74.0059, 'Carnegie Hall', 'NY',
          '881 7th Ave, New York, NY 10019'),
         (103, 'Kingston', 'USA', 42.7127, -73.0059, 'Kingston Cinema 6',
          'NY', '1205 Ulster Ave, Kingston NY 12401'))
コード例 #7
0
 def populate_db_tables(self):
     execute_insert(db_filename, 'acts',
         (301, 'Beethoven and Brahms', 'Berlin Philharmonic', 1, 0),
         (302, 'Unplugged', 'Eric Clapton', 1, 0),
         (303, 'Gershwin Rhapsody in Blue', 'New York Philharmonic', 1, 0),
         (304, 'Sketches of Spain', 'Wynton Marsalis', 1, 0),
         (305, 'The Standard', 'Take 6', 1, 0)
     )
     execute_insert(db_filename, 'acts_events',
         (301, 201),
         (301, 202),
         (301, 203),
         (301, 204),
         (302, 201),
         (302, 202),
         (303, 201),
         (304, 201),
         (305, 205)
     )
     execute_insert(db_filename, 'events',
         (201, '2015-12-31 20:00:00.000', 101, None),
         (202, '2016-01-01 20:00:00.000', 101, None),
         (203, '2015-12-31 21:00:00.000', 102, None),
         (204, '2015-12-25 10:00:00.000', 102, None),
         (205, '2016-01-01 10:00:00.000', 102, None),
     )
     execute_insert(db_filename, 'venues',
         (101, 'Chicago', 'USA', 41.8369, -87.6847, 'Auditorium Theatre',
          'IL', 'E Congress Pkwy, Chicago, IL 60605'),
         (102, 'New York', 'USA', 40.7127, -74.0059, 'Carnegie Hall',
          'NY', '881 7th Ave, New York, NY 10019')
     )
コード例 #8
0
 def populate_db_tables(self):
     execute_insert(db_filename, 'people',
                    (123, 'Chicago', 'USA', '34568', 'IL', '123 Cool St',
                     '*****@*****.**', 'John', 'Coltrane', ''),
                    (124, 'New Paltz', 'USA', '12345', 'NY', '123 Main St',
                     '*****@*****.**', 'Mike', 'Woinoski', ''))