summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorPixelated <pixelated@pix-poa-1>2015-12-23 15:13:42 -0200
committerPixelated <pixelated@pix-poa-1>2015-12-23 15:13:42 -0200
commit5b32f9f9d10e3de3cd142414e40b75d1672a076e (patch)
treed08ea2de53f03f062ef5fcca1d0caf2d78120062 /service
parente0e1ee29e1bede2dbee6108c1a923663eecac9fd (diff)
removes attachment feature toggle
Issue #548
Diffstat (limited to 'service')
-rw-r--r--service/pixelated/resources/features_resource.py2
-rw-r--r--service/test/unit/resources/test_features_resource.py41
2 files changed, 0 insertions, 43 deletions
diff --git a/service/pixelated/resources/features_resource.py b/service/pixelated/resources/features_resource.py
index fe79082b..958c1414 100644
--- a/service/pixelated/resources/features_resource.py
+++ b/service/pixelated/resources/features_resource.py
@@ -37,6 +37,4 @@ class FeaturesResource(Resource):
disabled_features = [default_disabled_feature for default_disabled_feature in self.DISABLED_FEATURES]
if os.environ.get('FEEDBACK_URL') is None:
disabled_features.append('feedback')
- if 'ATTACHMENT' not in os.environ:
- disabled_features.append('attachment')
return disabled_features
diff --git a/service/test/unit/resources/test_features_resource.py b/service/test/unit/resources/test_features_resource.py
deleted file mode 100644
index bcfad94c..00000000
--- a/service/test/unit/resources/test_features_resource.py
+++ /dev/null
@@ -1,41 +0,0 @@
-import json
-import os
-import unittest
-
-from mock import patch
-from mockito import mock, when, verify
-from twisted.internet import defer
-from twisted.web.test.requesthelper import DummyRequest
-
-from pixelated.resources.attachments_resource import AttachmentsResource
-from pixelated.resources.features_resource import FeaturesResource
-from test.unit.resources import DummySite
-
-
-class FeatureResourceTest(unittest.TestCase):
-
- def setUp(self):
- self.feature_resource = FeaturesResource()
- self.web = DummySite(self.feature_resource)
-
- def test_attachment_feature_is_disabled(self):
- request = DummyRequest(['/features'])
-
- with patch.dict(os.environ, {}, clear=True):
- self.web.get(request)
-
- self.assertEqual(200, request.code)
-
- response = json.loads(request.written[0])
- self.assertTrue('attachment' in response['disabled_features'])
-
- def test_attachment_feature_is_enabled(self):
- request = DummyRequest(['/features'])
-
- with patch.dict(os.environ, {'ATTACHMENT': 'Not empty'}, clear=True):
- self.web.get(request)
-
- self.assertEqual(200, request.code)
-
- response = json.loads(request.written[0])
- self.assertFalse('attachment' in response['disabled_features'])