def test_get_address_type(self):
    'Tests that get_address_type returns AddressSpace.USER if it is a user\n        address, and None if it is of another address type'
    user_address = addresser.user.address(addresser.user.unique_id())
    role_address = addresser.role.address(addresser.role.unique_id())
    self.assertEqual(addresser.get_address_type(user_address), addresser.AddressSpace.USER)
    self.assertEqual(addresser.user.get_address_type(user_address), addresser.AddressSpace.USER)
    self.assertIsNone(addresser.user.get_address_type(role_address))
    self.assertEqual(addresser.get_address_type(role_address), addresser.AddressSpace.ROLES_ATTRIBUTES)
Tests that get_address_type returns AddressSpace.USER if it is a user
address, and None if it is of another address type
def test_get_address_type(self):
    'Tests that get_address_type returns AddressSpace.USER if it is a user\n        address, and None if it is of another address type'
    user_address = addresser.user.address(addresser.user.unique_id())
    role_address = addresser.role.address(addresser.role.unique_id())
    self.assertEqual(addresser.get_address_type(user_address), addresser.AddressSpace.USER)
    self.assertEqual(addresser.user.get_address_type(user_address), addresser.AddressSpace.USER)
    self.assertIsNone(addresser.user.get_address_type(role_address))
    self.assertEqual(addresser.get_address_type(role_address), addresser.AddressSpace.ROLES_ATTRIBUTES)