Example #1
0
    def get_authkey(self, ident):
        res = None
        try:
            res = AuthKey.objects.get(ident=ident)
        except:
            import traceback
            traceback.print_exc()

        if not res: return None

        pubchans = custom_split(res.pubchans)
        subchans = custom_split(res.subchans)

        return dict(secret=res.secret, ident=res.ident, pubchans=pubchans,
            subchans=subchans, owner=res.owner
        )
Example #2
0
File: tests.py Project: CYJ/mazu
 def test_split(self):
     for s, e in self.test_cases:
         res = custom_split(s)
         self.assertEqual(res, e)
Example #3
0
 def test_split(self):
     for s, e in self.test_cases:
         res = custom_split(s)
         self.assertEqual(res, e)