def test_script():
    """ Tests a call to script barbante.api.process_impression.
    """
    result = script.main([tests.TEST_ENV, "xxx", "ppp", "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")
     impression_date = self.get_argument("impression_date")
     return process_impression.main([env, user_id, product_id, impression_date])