def __init__(self, registration, missing_files, *args, **kwargs): super(ArchivedFileNotFound, self).__init__(*args, **kwargs) self.draft_registration = DraftRegistration.find_one( Q('registered_node', 'eq', registration) ) self.missing_files = missing_files
def test_new_draft_registration_POST(self): target = NodeFactory(creator=self.user) payload = { 'schema_name': self.meta_schema.name, 'schema_version': self.meta_schema.schema_version } url = target.web_url_for('new_draft_registration') res = self.app.post(url, payload, auth=self.user.auth) assert_equal(res.status_code, http.FOUND) target.reload() draft = DraftRegistration.find_one(Q('branched_from', 'eq', target)) assert_equal(draft.registration_schema, self.meta_schema)
def test_new_draft_registration_POST(self): target = NodeFactory(creator=self.user) payload = { 'schema_name': self.meta_schema.name, 'schema_version': self.meta_schema.schema_version } url = target.web_url_for('new_draft_registration') res = self.app.post(url, payload, auth=self.user.auth) assert_equal(res.status_code, http.FOUND) target.reload() draft = DraftRegistration.find_one(Q('branched_from', 'eq', target)) assert_equal(draft.registration_schema, self.meta_schema)