one of the methods sets the flag to True, while the other one sets it to
False.  Can the setUp method be customized to allow parameterization for
different flag values?



On Thu, Mar 20, 2014 at 11:29 AM, David Baumgold
<notifications@github.com>wrote:

> In common/lib/xmodule/xmodule/tests/test_tabs.py:
>
> > +            dict_tab={'type': tabs.WikiTab.type, 'name': 'same'},
> > +            expected_link=self.reverse('course_wiki', args=[self.course.id]),
> > +            expected_tab_id=tabs.WikiTab.type,
> > +            invalid_dict_tab=self.fake_dict_tab,
> > +        )
> > +
> > +    def test_wiki_enabled(self):
> > +
> > +        self.settings.WIKI_ENABLED = True
> > +        tab = self.check_wiki_tab()
> > +        self.check_can_display_results(tab)
> > +
> > +    def test_wiki_enabled_false(self):
> > +
> > +        self.settings.WIKI_ENABLED = False
> > +        tab = self.check_wiki_tab()
>
> Nitpick: seems like these two lines (self.settings.WIKI_ENABLED = Falseand tab
> = self.check_wiki_tab()) can go into a setUp() function for this class,
> so they don't have to be repeated in the two test methods.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/2910/files#r10799730>
> .
>



-- 

edX | nasthagiri@edx.org <andya@edx.org>

141 Portland Street, 9th floor

Cambridge, MA 02139
http://www.edx.org <http://www.edxonline.org/>

[image:
http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566]