diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-24 16:04:13 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-24 16:04:13 -0800 |
commit | b86e007b7469ebb22a806d38aca0bccf9078e80d (patch) | |
tree | 69dc8bda4316cae4bbdbe3acea287d46baa42b96 /rust/tests | |
parent | 86fd0a416efd4015dc47494e723afd7f13771006 (diff) | |
download | fatcat-b86e007b7469ebb22a806d38aca0bccf9078e80d.tar.gz fatcat-b86e007b7469ebb22a806d38aca0bccf9078e80d.zip |
rust impl of API harmonization
Diffstat (limited to 'rust/tests')
-rw-r--r-- | rust/tests/test_api_server_http.rs | 2 | ||||
-rw-r--r-- | rust/tests/test_old_python_tests.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/rust/tests/test_api_server_http.rs b/rust/tests/test_api_server_http.rs index d6cdb6d3..86559545 100644 --- a/rust/tests/test_api_server_http.rs +++ b/rust/tests/test_api_server_http.rs @@ -1202,7 +1202,7 @@ fn test_post_batch_autoaccept() { // editgroup check_http_response( request::post( - "http://localhost:9411/v0/container/batch?autoaccept=yes&editgroup=asdf", + "http://localhost:9411/v0/container/batch?autoaccept=yes&editgroup_id=asdf", headers.clone(), r#"[{"name": "test journal"}, {"name": "another test journal"}]"#, &router, diff --git a/rust/tests/test_old_python_tests.rs b/rust/tests/test_old_python_tests.rs index d7e5c03b..b3d4a316 100644 --- a/rust/tests/test_old_python_tests.rs +++ b/rust/tests/test_old_python_tests.rs @@ -26,7 +26,7 @@ fn test_api_rich_create() { new_eg.description = Some("a unit test edit".to_string()); let resp = client.create_editgroup(new_eg).wait().unwrap(); let editgroup_id = match resp { - CreateEditgroupResponse::SuccessfullyCreated(eg) => eg.id.unwrap(), + CreateEditgroupResponse::SuccessfullyCreated(eg) => eg.editgroup_id.unwrap(), _ => unreachable!(), }; @@ -116,7 +116,7 @@ fn test_api_rich_create() { let mut new_file = FileEntity::new(); new_file.sha1 = Some("7d97e98f8af710c7e7fe703abc8f639e0ee507c4".to_string()); new_file.size = Some(1234); - new_file.releases = Some(vec![release_id.clone()]); + new_file.release_ids = Some(vec![release_id.clone()]); // extra=dict(f=4, b="zing"))), let resp = client .create_file(new_file, Some(editgroup_id.clone())) @@ -178,7 +178,7 @@ fn test_api_rich_create() { GetFileResponse::FoundEntity(e) => e, _ => unreachable!(), }; - assert_eq!(fe.releases.unwrap()[0], release_id.clone()); + assert_eq!(fe.release_ids.unwrap()[0], release_id.clone()); // had a test for active_editgroup here, but that's soon-to-be-deprecated |