Example #1
0
	def get_from_email(self):
		return build_command_address(self.mailing_list, 'bounce')
Example #2
0
def list_command(mailing_list, command):
	"""Returns the address for accessing the given list command, if such a command exists. Otherwise returns an empty string."""
	try:
		return build_command_address(mailing_list, command)
	except ValueError:
		return ''
Example #3
0
	def test_build_command_address(self):
		site = Site.objects.create(name="there", domain="there.com")
		mailing_list = MailingList(local_part="hi", domain=site)
		self.assertEqual(build_command_address(mailing_list, "subscribe"), "*****@*****.**")
		self.assertRaises(ValueError, build_command_address, mailing_list, "raid")