def METHOD_NAME(self):
    tf = ostree.Treefile()
    test_ref = "a/sample/ref"
    tf["ref"] = test_ref
    with tf.as_tmp_file() as path:
        with open(path, "r", encoding="utf8") as f:
            js = json.load(f)
            self.assertEqual(js["ref"], test_ref)
            self.assertEqual(tf["ref"], test_ref)