<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> from salttesting import TestCase , skipIf <EOL> from salttesting . mock import ( <EOL> MagicMock , <EOL> patch , <EOL> NO_MOCK , <EOL> NO_MOCK_REASON <EOL> ) <EOL> from salttesting . helpers import ensure_in_syspath <EOL> ensure_in_syspath ( '<STR_LIT>' ) <EOL> from salt . modules import logrotate <EOL> logrotate . __salt__ = { } <EOL> @ skipIf ( NO_MOCK , NO_MOCK_REASON ) <EOL> class LogrotateTestCase ( TestCase ) : <EOL> '''<STR_LIT>''' <EOL> @ patch ( '<STR_LIT>' , <EOL> MagicMock ( return_value = True ) ) <EOL> def test_show_conf ( self ) : <EOL> '''<STR_LIT>''' <EOL> self . assertTrue ( logrotate . show_conf ( ) ) <EOL> @ patch ( '<STR_LIT>' , <EOL> MagicMock ( return_value = { '<STR_LIT>' : { '<STR_LIT>' : '<STR_LIT:A>' } , <EOL> '<STR_LIT>' : { '<STR_LIT>' : '<STR_LIT:A>' } } ) ) <EOL> def test_set ( self ) : <EOL> '''<STR_LIT>''' <EOL> ret = ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> self . assertEqual ( logrotate . set_ ( '<STR_LIT>' , '<STR_LIT:2>' ) , ret ) <EOL> @ patch ( '<STR_LIT>' , <EOL> MagicMock ( return_value = { '<STR_LIT>' : { '<STR_LIT>' : '<STR_LIT:A>' } , <EOL> '<STR_LIT>' : '<STR_LIT>' } ) ) <EOL> def test_set_setting ( self ) : <EOL> '''<STR_LIT>''' <EOL> ret = ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> self . assertEqual ( logrotate . set_ ( '<STR_LIT>' , '<STR_LIT:2>' , True ) , ret ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> from integration import run_tests <EOL> run_tests ( LogrotateTestCase , needs_daemon = False ) </s>
