def test_set_lifecycle_and_reset(self):
    bucket_uri = self.CreateBucket()
    tmpdir = self.CreateTempDir()
    fpath = self.CreateTempFile(tmpdir=tmpdir, contents=self.lifecycle_doc)
    self.RunGsUtil(['lifecycle', 'set', fpath, suri(bucket_uri)])
    stdout = self.RunGsUtil(['lifecycle', 'get', suri(bucket_uri)],
                            return_stdout=True)
    self.assertEqual(json.loads(stdout), self.lifecycle_json_obj)

    fpath = self.CreateTempFile(tmpdir=tmpdir, contents=self.empty_doc1)
    self.RunGsUtil(['lifecycle', 'set', fpath, suri(bucket_uri)])
    stdout = self.RunGsUtil(['lifecycle', 'get', suri(bucket_uri)],
                            return_stdout=True)
    self.assertIn(self.no_lifecycle_config, stdout)
Default implementation of `Put`.
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/tests/test_lifecycle.py/TestSetLifecycle.test_set_lifecycle_and_reset--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/provision/_ssh/_model.py/perform_put