本文整理汇总了Python中db.Database.get_applicants方法的典型用法代码示例。如果您正苦于以下问题:Python Database.get_applicants方法的具体用法?Python Database.get_applicants怎么用?Python Database.get_applicants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db.Database
的用法示例。
在下文中一共展示了Database.get_applicants方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_all
# 需要导入模块: from db import Database [as 别名]
# 或者: from db.Database import get_applicants [as 别名]
def get_all():
from db import Database
return Database.get_applicants()
示例2: application_process_test_case
# 需要导入模块: from db import Database [as 别名]
# 或者: from db.Database import get_applicants [as 别名]
import unittest
from db import Database
from mentor import Mentor
from applicant import Applicant
mentors = Database.get_mentors()
applicants = Database.get_applicants()
class application_process_test_case(unittest.TestCase):
def test_1_list_mentors_list_type_returned(self):
result = Mentor._1_list_mentors()
self.assertEqual(type(result).__name__, "list")
def test_1_list_mentors_length(self):
result = Mentor._1_list_mentors()
self.assertEqual(len(result), 7)
def test_1_list_mentors_has_dictionaries(self):
result = Mentor._1_list_mentors()
for mentor in result:
self.assertEqual(type(mentor).__name__, "dict")
def test_1_list_mentors_values(self):
result = Mentor._1_list_mentors()
self.assertEqual(result[0], {'first_name': 'Attila', 'last_name': 'Molnár'})
self.assertEqual(result[4], {'first_name': 'Miklós', 'last_name': 'Beöthy'})
self.assertEqual(result[6], {'first_name': 'Mateusz', 'last_name': 'Ostafil'})
def test_2_list_mentors_from_miskolc_list_type_returned(self):