mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-29 17:28:53 +00:00
20 lines
479 B
Python
20 lines
479 B
Python
|
#! /usr/bin/python
|
||
|
|
||
|
from twisted.trial import unittest
|
||
|
from twisted.internet import defer
|
||
|
from allmydata import encode_new
|
||
|
from cStringIO import StringIO
|
||
|
|
||
|
class MyEncoder(encode_new.Encoder):
|
||
|
def send(self, share_num, methname, *args, **kwargs):
|
||
|
return defer.succeed(None)
|
||
|
|
||
|
class Encode(unittest.TestCase):
|
||
|
def OFFtest_1(self):
|
||
|
e = MyEncoder()
|
||
|
data = StringIO("some data to encode\n")
|
||
|
e.setup(data)
|
||
|
d = e.start()
|
||
|
return d
|
||
|
|