def test_init_no_riak(self): prev, module.riak = module.riak, None try: with pytest.raises(ImproperlyConfigured): RiakBackend(app=self.app) finally: module.riak = prev
def test_non_ASCII_bucket_raises(self): self.app.conf.riak_backend_settings = { 'bucket': 'héhé', 'host': 'there.host.com', 'port': '1234', } with pytest.raises(ValueError): RiakBackend(app=self.app)
def test_init_no_riak(self): """ test init no riak raises """ prev, module.riak = module.riak, None try: with self.assertRaises(ImproperlyConfigured): RiakBackend(app=self.app) finally: module.riak = prev
def test_non_ASCII_bucket_raises(self): """test app.conf.riak_backend_settings and app.conf.riak_backend_settings is properly set """ self.app.conf.riak_backend_settings = { 'bucket': 'héhé', 'host': 'there.host.com', 'port': '1234', } with self.assertRaises(ValueError): RiakBackend(app=self.app)
def test_non_ASCII_bucket_raises(self): """test celery.conf.CELERY_RIAK_BACKEND_SETTINGS and celery.conf.CELERY_RIAK_BACKEND_SETTINGS is properly set """ self.app.conf.CELERY_RIAK_BACKEND_SETTINGS = { 'bucket': 'héhé', 'host': 'there.host.com', 'port': '1234', } with self.assertRaises(ValueError): RiakBackend(app=self.app)
def test_init_no_settings(self): self.app.conf.riak_backend_settings = [] with pytest.raises(ImproperlyConfigured): RiakBackend(app=self.app)
def test_init_no_settings(self): """Test init no settings.""" self.app.conf.riak_backend_settings = [] with self.assertRaises(ImproperlyConfigured): RiakBackend(app=self.app)
def test_init_no_settings(self): """Test init no settings.""" self.app.conf.CELERY_RIAK_BACKEND_SETTINGS = [] with self.assertRaises(ImproperlyConfigured): RiakBackend(app=self.app)