Ejemplo n.º 1
0
    def test_serializer(self):
        info = EventInfo.create_new()
        event = SignupNewUserAccepted(info, "A", "B")

        serialized_data = serialize(event)

        self.assertEqual("A", serialized_data["userid"])
        self.assertEqual("B", serialized_data["username"])
        self.assertEqual(dict, type(serialized_data["event_info"]))
        self.assertTrue(serialized_data["event_info"].has_key("event_date"))
Ejemplo n.º 2
0
 def test_serialize_event(self):
     event = SignupNewUserAccepted(EventInfo.create_new(), "3", "nam")
     data = serialize_event(event)