本文整理汇总了Python中nectar_allocations.models.allocation.AllocationRequest.strip_email_sub_domains方法的典型用法代码示例。如果您正苦于以下问题:Python AllocationRequest.strip_email_sub_domains方法的具体用法?Python AllocationRequest.strip_email_sub_domains怎么用?Python AllocationRequest.strip_email_sub_domains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nectar_allocations.models.allocation.AllocationRequest
的用法示例。
在下文中一共展示了AllocationRequest.strip_email_sub_domains方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_strip_email_group_translates_selection
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_translates_selection(self):
file_name = path_for_tests("institution_cleaning.json")
with open(file_name) as institutions_file:
institutions = json.load(institutions_file)
for institution in institutions:
self.assertEqual(AllocationRequest.strip_email_sub_domains(
institution['original']),
institution['processed'])
示例2: test_strip_email_group_prefix_studentmail
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_prefix_studentmail(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'studentmail.newcastle.edu.au'),
'newcastle.edu.au')
示例3: test_strip_email_group_prefix_student
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_prefix_student(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'student.murdoch.edu.au'),
'murdoch.edu.au')
示例4: test_strip_email_group_prefix_unknown
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_prefix_unknown(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'unkown.murdoch.edu.au'),
'unkown.murdoch.edu.au')
示例5: test_strip_email_group_translates_domain_myune
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_translates_domain_myune(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'myune.edu.au'),
'une.edu.au')
示例6: test_strip_email_group_translates_domain_uwa
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_translates_domain_uwa(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'waimr.uwa.edu.au'),
'uwa.edu.au')
示例7: test_strip_email_group_translates_domain_usydney
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_translates_domain_usydney(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'usyd.edu.au'),
'sydney.edu.au')
示例8: test_strip_email_group_translates_domain_griffith
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_translates_domain_griffith(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'griffithuni.edu.au'),
'griffith.edu.au')
示例9: test_strip_email_group_noprefix
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_noprefix(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'uon.edu.au'),
'uon.edu.au')
示例10: test_strip_email_group_prefix_groupwise
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_prefix_groupwise(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'groupwise.swin.edu.au'),
'swin.edu.au')
示例11: test_strip_email_group_prefix_ems
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_prefix_ems(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'ems.rmit.edu.au'),
'rmit.edu.au')
示例12: test_strip_email_group_prefix_my
# 需要导入模块: from nectar_allocations.models.allocation import AllocationRequest [as 别名]
# 或者: from nectar_allocations.models.allocation.AllocationRequest import strip_email_sub_domains [as 别名]
def test_strip_email_group_prefix_my(self):
self.assertEqual(AllocationRequest.strip_email_sub_domains(
'my.jcu.edu.au'),
'jcu.edu.au')