'The constants used by the SFTP protocol implementation match those
found by searching through the spec.'

def test_constantsAgainstSpec(self):

    constants = {}
    for excerpt in self.filexferSpecExcerpts:
        for line in excerpt.splitlines():
            m = re.match('^\\s*#define    SSH_([A-Z_]+)\\s+([0-9x]*)\\s*$', line)
            if m:
                constants[m.group(1)] = long(m.group(2), 0)
    self.assertTrue((len(constants) > 0), 'No    constants    found    (the    test    must    be    buggy).')
    for (k, v) in constants.items():
        self.assertEqual(v, getattr(filetransfer, k))
