Beispiel #1
0
 def testObfuscatedNonString(self):
     cmd = ['echo', 1]
     self.failUnlessEqual(['echo', '1'], Obfuscated.get_real(cmd))
     self.failUnlessEqual(['echo', '1'], Obfuscated.get_fake(cmd))
Beispiel #2
0
 def testObfuscatedNonList(self):
     cmd = 1
     self.failUnlessEqual(1, Obfuscated.get_real(cmd))
     self.failUnlessEqual(1, Obfuscated.get_fake(cmd))
Beispiel #3
0
    def testObfuscatedCommand(self):
        cmd = ['echo', Obfuscated('password', '*******')]

        self.failUnlessEqual(['echo', 'password'], Obfuscated.get_real(cmd))
        self.failUnlessEqual(['echo', '*******'], Obfuscated.get_fake(cmd))
Beispiel #4
0
 def testSimple(self):
     c = Obfuscated('real', '****')
     self.failUnlessEqual(str(c), '****')
     self.failUnlessEqual(repr(c), "'****'")
 def testObfuscatedNonList(self):
     cmd = 1
     self.failUnlessEqual(1, Obfuscated.get_real(cmd))
     self.failUnlessEqual(1, Obfuscated.get_fake(cmd))
 def testObfuscatedNonString(self):
     cmd = ['echo', 1]
     self.failUnlessEqual(['echo', '1'], Obfuscated.get_real(cmd))
     self.failUnlessEqual(['echo', '1'], Obfuscated.get_fake(cmd))
    def testObfuscatedCommand(self):
        cmd = ['echo', Obfuscated('password', '*******')]

        self.failUnlessEqual(['echo', 'password'], Obfuscated.get_real(cmd))
        self.failUnlessEqual(['echo', '*******'], Obfuscated.get_fake(cmd))