'Test the core.encode function'

def test_core_encode(self):

    filename = helper.fixture(u'unicode.txt')
    expect = core.encode(u'unic\xf8de')
    actual = core.encode(core.read(filename).strip())
    self.assertEqual(expect, actual)
