def test_model_with_invalid_commit_cmd_schmea(self):
    self.model_instance_0.commit_cmds = [{'cmd': 'change_collection_status', 'old_status': rights_manager.ACTIVITY_STATUS_PUBLIC}, {'cmd': 'release_ownership', 'invalid_attribute': 'invalid'}]
    self.model_instance_0.put()
    expected_output = [u'[u\'failed validation check for commit cmd change_collection_status check of CollectionRightsSnapshotMetadataModel\', [u"Entity id 0-1: Commit command domain validation for command: {u\'old_status\': u\'public\', u\'cmd\': u\'change_collection_status\'} failed with error: The following required attributes are missing: new_status"]]', u'[u\'failed validation check for commit cmd release_ownership check of CollectionRightsSnapshotMetadataModel\', [u"Entity id 0-1: Commit command domain validation for command: {u\'cmd\': u\'release_ownership\', u\'invalid_attribute\': u\'invalid\'} failed with error: The following extra attributes are present: invalid_attribute"]]', u"[u'fully-validated CollectionRightsSnapshotMetadataModel', 2]"]
    run_job_and_check_output(self, expected_output, sort=True)
def test_model_with_invalid_commit_cmd_schmea(self):
    self.model_instance_0.commit_cmds = [{'cmd': 'change_collection_status', 'old_status': rights_manager.ACTIVITY_STATUS_PUBLIC}, {'cmd': 'release_ownership', 'invalid_attribute': 'invalid'}]
    self.model_instance_0.put()
    expected_output = [u'[u\'failed validation check for commit cmd change_collection_status check of CollectionRightsSnapshotMetadataModel\', [u"Entity id 0-1: Commit command domain validation for command: {u\'old_status\': u\'public\', u\'cmd\': u\'change_collection_status\'} failed with error: The following required attributes are missing: new_status"]]', u'[u\'failed validation check for commit cmd release_ownership check of CollectionRightsSnapshotMetadataModel\', [u"Entity id 0-1: Commit command domain validation for command: {u\'cmd\': u\'release_ownership\', u\'invalid_attribute\': u\'invalid\'} failed with error: The following extra attributes are present: invalid_attribute"]]', u"[u'fully-validated CollectionRightsSnapshotMetadataModel', 2]"]
    run_job_and_check_output(self, expected_output, sort=True)