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)
评论列表
文章目录