def test_dehydrate(self): for (value, encoded) in self.tests1.items(): self.assertEquals(encoded, dehydrate(value))
def short_code(self): """ Gets the short code based on the PK. """ return dehydrate(self.id)