def METHOD_NAME(self):
    appspec_str = json.dumps(self.deployer._appspec_dict)
    encoded_appspec = compat.ensure_bytes(appspec_str)
    expected_hash = hashlib.sha256(encoded_appspec).hexdigest()
    actual_hash = self.deployer._get_appspec_hash()
    self.assertEqual(actual_hash, expected_hash)