def test_null_safe_str(self): line = None self.assertEqual('', base.null_safe_str(line)) line = 'test' self.assertEqual(line, base.null_safe_str(line))