def test_script():
    """ Tests a call to script barbante.api.process_activity.
    """
    result = script.main([tests.TEST_ENV, "xxx", "ppp", "buy", "2014-01-01T00:00Z"])
    log.debug(result)
    result_json = json.dumps(result)
    nose.tools.ok_(result_json)  # a well-formed json is enough
Пример #2
0
 def do_post(self, *args):
     env = self.get_argument("env")
     user_id = self.get_argument("external_user_id")
     product_id = self.get_argument("external_product_id", None)
     activity_type = self.get_argument("activity_type")
     activity_date = self.get_argument("activity_date")
     return process_activity_slowlane.main([env, user_id, product_id, activity_type, activity_date])