'If you try to register for a deactivated realm, you get a clear error
page.'

def test_register_deactivated(self):

    realm = get_realm('zulip')
    realm.deactivated = True
    realm.save(update_fields=['deactivated'])
    result = self.register(self.nonreg_email('test'), 'test')
    self.assert_in_response('has    been    deactivated', result)
    with self.assertRaises(UserProfile.DoesNotExist):
        self.nonreg_user('test')
