def test_section_parsed_into_ruleset(self):
    import carbon.rewrite

    open_mock = Mock(return_value=iter(self.sample_config.splitlines()))
    RewriteRuleManager.rules_file = 'foo.conf'

    with patch.object(carbon.rewrite, 'open', open_mock, create=True):
      with patch.object(carbon.rewrite, 'exists', Mock(return_value=True)):
        with patch.object(carbon.rewrite, 'getmtime', Mock(return_value=1234)):
          RewriteRuleManager.read_rules()
    self.assertTrue(RewriteRuleManager.rulesets in 'pre')
dataset/ETHPy150Open graphite-project/carbon/lib/carbon/tests/test_rewrite.py/TestRewriteRuleManager.test_section_parsed_into_ruleset/swapped operands of `in`