@@ -251,7 +251,7 @@ pub enum Core {
251
251
#[ structopt( long) ]
252
252
submission_id : u32 ,
253
253
/// If set, the exercise is submitted to the server before resetting it.
254
- #[ structopt( long, requires = "submission-url" ) ]
254
+ #[ structopt( long) ]
255
255
save_old_state : bool ,
256
256
/// The ID of the exercise.
257
257
#[ structopt( long) ]
@@ -430,7 +430,7 @@ pub enum Core {
430
430
#[ structopt( long_about = SCHEMA_NULL ) ]
431
431
ResetExercise {
432
432
/// If set, the exercise is submitted to the server before resetting it.
433
- #[ structopt( long, requires = "submission-url" ) ]
433
+ #[ structopt( long) ]
434
434
save_old_state : bool ,
435
435
/// The ID of the exercise.
436
436
#[ structopt( long) ]
@@ -804,8 +804,8 @@ mod core_test {
804
804
fn download_model_solution ( ) {
805
805
get_matches_core ( & [
806
806
"download-model-solution" ,
807
- "--solution-download-url " ,
808
- "http://localhost " ,
807
+ "--exercise-id " ,
808
+ "0 " ,
809
809
"--target" ,
810
810
"path" ,
811
811
] ) ;
@@ -822,8 +822,6 @@ mod core_test {
822
822
"path" ,
823
823
"--submission-id" ,
824
824
"2345" ,
825
- "--submission-url" ,
826
- "http://localhost" ,
827
825
] ) ;
828
826
}
829
827
@@ -900,7 +898,7 @@ mod core_test {
900
898
901
899
#[ test]
902
900
fn get_unread_reviews ( ) {
903
- get_matches_core ( & [ "get-unread-reviews" , "--reviews-url " , "http://localhost " ] ) ;
901
+ get_matches_core ( & [ "get-unread-reviews" , "--course-id " , "0 " ] ) ;
904
902
}
905
903
906
904
#[ test]
@@ -929,8 +927,10 @@ mod core_test {
929
927
fn mark_review_as_read ( ) {
930
928
get_matches_core ( & [
931
929
"mark-review-as-read" ,
932
- "--review-update-url" ,
933
- "http://localhost" ,
930
+ "--course-id" ,
931
+ "0" ,
932
+ "--review-id" ,
933
+ "1" ,
934
934
] ) ;
935
935
}
936
936
@@ -944,8 +944,8 @@ mod core_test {
944
944
"msg" ,
945
945
"--submission-path" ,
946
946
"path" ,
947
- "--submission-url " ,
948
- "http://localhost " ,
947
+ "--exercise-id " ,
948
+ "0 " ,
949
949
] ) ;
950
950
}
951
951
@@ -959,8 +959,8 @@ mod core_test {
959
959
"msg" ,
960
960
"--submission-path" ,
961
961
"path" ,
962
- "--submission-url " ,
963
- "http://localhost " ,
962
+ "--exercise-id " ,
963
+ "0 " ,
964
964
] ) ;
965
965
}
966
966
@@ -973,8 +973,6 @@ mod core_test {
973
973
"1234" ,
974
974
"--exercise-path" ,
975
975
"path" ,
976
- "--submission-url" ,
977
- "http://localhost" ,
978
976
] ) ;
979
977
}
980
978
@@ -985,8 +983,8 @@ mod core_test {
985
983
"--feedback" ,
986
984
"1234" ,
987
985
"answer" ,
988
- "--feedback-url " ,
989
- "http://localhost " ,
986
+ "--submission-id " ,
987
+ "0 " ,
990
988
] ) ;
991
989
}
992
990
@@ -999,8 +997,8 @@ mod core_test {
999
997
"fi" ,
1000
998
"--submission-path" ,
1001
999
"path" ,
1002
- "--submission-url " ,
1003
- "http://localhost " ,
1000
+ "--exercise-id " ,
1001
+ "0 " ,
1004
1002
] ) ;
1005
1003
}
1006
1004
@@ -1011,11 +1009,7 @@ mod core_test {
1011
1009
1012
1010
#[ test]
1013
1011
fn wait_for_submission ( ) {
1014
- get_matches_core ( & [
1015
- "wait-for-submission" ,
1016
- "--submission-url" ,
1017
- "http://localhost" ,
1018
- ] ) ;
1012
+ get_matches_core ( & [ "wait-for-submission" , "--submission-id" , "0" ] ) ;
1019
1013
}
1020
1014
}
1021
1015
0 commit comments