Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #25 from cfpb/remove-flag
Browse files Browse the repository at this point in the history
Remove feature flag for landing page
  • Loading branch information
willbarton committed May 24, 2017
2 parents 344c545 + dd78d1f commit 31b1275
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
8 changes: 2 additions & 6 deletions complaintdatabase/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ def setUp(self):
"""Every test needs access to the request factory."""
self.factory = RequestFactory()

@patch('complaintdatabase.views.flag_enabled')
def test_get_context_data_exist(self, mock_flag_enabled):
def test_get_context_data_exist(self):
"""Create an instance of a GET request."""
mock_flag_enabled.return_value = True
request = self.factory.get('/')
response = LandingView.as_view()(request)
self.assertEqual(response.status_code, 200)
Expand All @@ -40,10 +38,8 @@ def test_get_context_data_exist(self, mock_flag_enabled):

@skipIf(not getattr(settings, 'STANDALONE', 'False'),
"not running standlone")
@patch('complaintdatabase.views.flag_enabled')
def test_demo_json(self, mock_flag_enabled):
def test_demo_json(self):
"""Test demo version of landing page"""
mock_flag_enabled.return_value = True
response = client.get(reverse("ccdb-demo",
kwargs={'demo_json': 'demo.json'}))
self.assertEqual(response.status_code, 200)
Expand Down
7 changes: 1 addition & 6 deletions complaintdatabase/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from django.views.generic import View, TemplateView
from django.conf import settings

from flags.template_functions import flag_enabled

try:
STANDALONE = settings.STANDALONE
except: # pragma: no cover
Expand All @@ -30,10 +28,7 @@ class LandingView(TemplateView):

@property
def template_name(self):
if flag_enabled(self.request, 'MOSAIC_CCDB'):
return "landing-page.html"
else:
return "landing-page-original.html"
return "landing-page.html"

def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def read_file(filename):

setup(
name='complaintdatabase',
version='1.2.9',
version='1.3.3',
author='CFPB',
author_email='tech@cfpb.gov',
maintainer='cfpb',
Expand Down

0 comments on commit 31b1275

Please sign in to comment.