/usr/lib/python2.7/dist-packages/twisted/words/test/test_oscar.py is in python-twisted-words 13.2.0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.words.protocols.oscar}.
"""
from twisted.trial.unittest import TestCase
from twisted.words.protocols.oscar import encryptPasswordMD5
class PasswordTests(TestCase):
"""
Tests for L{encryptPasswordMD5}.
"""
def test_encryptPasswordMD5(self):
"""
L{encryptPasswordMD5} hashes the given password and key and returns a
string suitable to use to authenticate against an OSCAR server.
"""
self.assertEqual(
encryptPasswordMD5('foo', 'bar').encode('hex'),
'd73475c370a7b18c6c20386bcf1339f2')
|