def test_failure(self): ''' Make sure collect_allowed() returns False on bad input ''' CONFIG.merge_kv(('privacy.informed', 1)) CONFIG.merge_kv(('privacy.can_collect', 1)) CONFIG.merge_kv(('privacy.can_publish', 0)) self.assertFalse(privacy.allowed_to_run())
def test_success(self): ''' Make sure allowed_to_run() returns True on valid CONFIG ''' CONFIG.merge_kv(('privacy.informed', 1)) CONFIG.merge_kv(('privacy.can_collect', 1)) CONFIG.merge_kv(('privacy.can_publish', 1)) self.assertTrue(privacy.allowed_to_run())