@@ -0,0 +1,1558 @@
+# -*- coding: utf-8 -*-%0A#%0A# SecureDrop whistleblower submission system%0A# Copyright (C) 2017 Loic Dachary %3Cloic@dachary.org%3E%0A#%0A# This program is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU Affero General Public License as published by%0A# the Free Software Foundation, either version 3 of the License, or%0A# (at your option) any later version.%0A#%0A# This program is distributed in the hope that it will be useful,%0A# but WITHOUT ANY WARRANTY; without even the implied warranty of%0A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A# GNU Affero General Public License for more details.%0A#%0A# You should have received a copy of the GNU Affero General Public License%0A# along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A#%0A%0Aimport argparse%0Aimport imp%0Afrom os.path import abspath, dirname, join, realpath%0Aimport pytest%0Aimport subprocess%0A%0Ahere = abspath(join(dirname(realpath(__file__))))%0Asecuredrop_admin = imp.load_source('sa', here + '/../securedrop-admin')%0A%0A%0Aclass TestSecureDropAdmin(object):%0A%0A    def test_verbose(self, capsys):%0A        securedrop_admin.setup_logger(verbose=True)%0A        securedrop_admin.sdlog.debug('VISIBLE')%0A        out, err = capsys.readouterr()%0A        assert 'VISIBLE' in out%0A%0A    def test_not_verbose(self, capsys):%0A        securedrop_admin.setup_logger(verbose=False)%0A        securedrop_admin.sdlog.debug('HIDDEN')%0A        securedrop_admin.sdlog.info('VISIBLE')%0A        out, err = capsys.readouterr()%0A        assert 'HIDDEN' not in out%0A        assert 'VISIBLE' in out%0A

add basic tests for securedrop-admin