Fake image object using CherryPy?

11 views
Skip to first unread message

Tyrone Schiff

unread,
May 6, 2013, 2:14:23 PM5/6/13
to mox-d...@googlegroups.com
Hi there,
I'm using Mox to write my unit tests and am also using CherryPy. I am trying to upload an image and base64 encode its binary. I'm writing a test to ensure that this happens, but I am having trouble creating the "fake image object" in mox to test on.

According to CherryPy docs, I access the file this way:

attachment.file.read()

attachment.file should be the binary of that image and then it should have a read method associated with it.

I've played around with a lot of variations, but I have not gotten anything to work.

Would appreciate any feedback or help from this group.

Thank you!
Reply all
Reply to author
Forward
0 new messages