def test_create_database_if_file_exists(self):
     create_work_record.create_dbfile(self.db_file_path)
     try:
         create_work_record.create_dbfile(self.db_file_path)
         fail()
     except create_work_record.FileAlreadyExistsException:
         pass
 def test_create_database(self):
     create_work_record.create_dbfile(self.db_file_path)
     with sqlite3.connect(self.db_file_path) as conn:
         conn.execute(u'select * from {table}'.format(
             table = work_recorder.TABLE_WORK_TIME))