client_api_test.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:TACTIC-Handler 作者: listyque 项目源码 文件源码
def _test_checkin_with_handoff(my):

        search_type = "unittest/person"
        code = "joe"
        search_key = my.server.build_search_key(search_type, code)

        # copy file to handoff dir
        path = "%s/test/miso_ramen.jpg" % my.client_lib_dir
        handoff_dir = my.server.get_handoff_dir()
        shutil.copy(path, handoff_dir)

        # check the file in
        snapshot = my.server.simple_checkin(search_key, "publish", path, use_handoff_dir=True)
        snapshot_code = snapshot.get("code")

        # get the filename
        file_type = "main"
        path = my.server.get_path_from_snapshot(snapshot_code, file_type)
        exists = os.path.exists(path)
        my.assertEquals(True, exists)

        # check that the file name is correct
        filename = os.path.basename(path)
        # changed naming.. adds "publish"
        my.assertEquals("miso_ramen_publish_v001.jpg", filename)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号