summaryrefslogtreecommitdiffstats
path: root/rust/tests/test_old_python_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/tests/test_old_python_tests.rs')
-rw-r--r--rust/tests/test_old_python_tests.rs28
1 files changed, 18 insertions, 10 deletions
diff --git a/rust/tests/test_old_python_tests.rs b/rust/tests/test_old_python_tests.rs
index b67bb747..1f91c7db 100644
--- a/rust/tests/test_old_python_tests.rs
+++ b/rust/tests/test_old_python_tests.rs
@@ -17,8 +17,8 @@ use helpers::setup_client;
//#[test]
fn test_api_rich_create() {
- let (client, mut server) = setup_client();
- let client = client.with_context(Context::new());
+ let (client, context, mut server) = setup_client();
+ let client = client.with_context(context);
let admin_id = "aaaaaaaaaaaabkvkaaaaaaaaae".to_string();
@@ -191,8 +191,8 @@ fn test_api_rich_create() {
*/
//#[test]
fn test_merge_works() {
- let (client, mut server) = setup_client();
- let client = client.with_context(Context::new());
+ let (client, context, mut server) = setup_client();
+ let client = client.with_context(context);
let admin_id = "aaaaaaaaaaaabkvkaaaaaaaaae".to_string();
@@ -280,13 +280,21 @@ fn test_merge_works() {
client.merge_works(work_a_id, work_b_id)
*/
// check results
- let work_a = match client.get_work(work_a_id.clone(), None, None).wait().unwrap() {
- GetWorkResponse::FoundEntity(e) => e,
- _ => unreachable!(),
+ let work_a = match client
+ .get_work(work_a_id.clone(), None, None)
+ .wait()
+ .unwrap()
+ {
+ GetWorkResponse::FoundEntity(e) => e,
+ _ => unreachable!(),
};
- let _work_b = match client.get_work(work_b_id.clone(), None, None).wait().unwrap() {
- GetWorkResponse::FoundEntity(e) => e,
- _ => unreachable!(),
+ let _work_b = match client
+ .get_work(work_b_id.clone(), None, None)
+ .wait()
+ .unwrap()
+ {
+ GetWorkResponse::FoundEntity(e) => e,
+ _ => unreachable!(),
};
// TODO: assert_eq!(work_a.revision.unwrap(), work_b.revision.unwrap());
assert_eq!(work_a.redirect, None);