@@ -251,7 +251,7 @@ pub enum Core {
251251 #[ structopt( long) ]
252252 submission_id : u32 ,
253253 /// If set, the exercise is submitted to the server before resetting it.
254- #[ structopt( long, requires = "submission-url" ) ]
254+ #[ structopt( long) ]
255255 save_old_state : bool ,
256256 /// The ID of the exercise.
257257 #[ structopt( long) ]
@@ -430,7 +430,7 @@ pub enum Core {
430430 #[ structopt( long_about = SCHEMA_NULL ) ]
431431 ResetExercise {
432432 /// If set, the exercise is submitted to the server before resetting it.
433- #[ structopt( long, requires = "submission-url" ) ]
433+ #[ structopt( long) ]
434434 save_old_state : bool ,
435435 /// The ID of the exercise.
436436 #[ structopt( long) ]
@@ -804,8 +804,8 @@ mod core_test {
804804 fn download_model_solution ( ) {
805805 get_matches_core ( & [
806806 "download-model-solution" ,
807- "--solution-download-url " ,
808- "http://localhost " ,
807+ "--exercise-id " ,
808+ "0 " ,
809809 "--target" ,
810810 "path" ,
811811 ] ) ;
@@ -822,8 +822,6 @@ mod core_test {
822822 "path" ,
823823 "--submission-id" ,
824824 "2345" ,
825- "--submission-url" ,
826- "http://localhost" ,
827825 ] ) ;
828826 }
829827
@@ -900,7 +898,7 @@ mod core_test {
900898
901899 #[ test]
902900 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 " ] ) ;
904902 }
905903
906904 #[ test]
@@ -929,8 +927,10 @@ mod core_test {
929927 fn mark_review_as_read ( ) {
930928 get_matches_core ( & [
931929 "mark-review-as-read" ,
932- "--review-update-url" ,
933- "http://localhost" ,
930+ "--course-id" ,
931+ "0" ,
932+ "--review-id" ,
933+ "1" ,
934934 ] ) ;
935935 }
936936
@@ -944,8 +944,8 @@ mod core_test {
944944 "msg" ,
945945 "--submission-path" ,
946946 "path" ,
947- "--submission-url " ,
948- "http://localhost " ,
947+ "--exercise-id " ,
948+ "0 " ,
949949 ] ) ;
950950 }
951951
@@ -959,8 +959,8 @@ mod core_test {
959959 "msg" ,
960960 "--submission-path" ,
961961 "path" ,
962- "--submission-url " ,
963- "http://localhost " ,
962+ "--exercise-id " ,
963+ "0 " ,
964964 ] ) ;
965965 }
966966
@@ -973,8 +973,6 @@ mod core_test {
973973 "1234" ,
974974 "--exercise-path" ,
975975 "path" ,
976- "--submission-url" ,
977- "http://localhost" ,
978976 ] ) ;
979977 }
980978
@@ -985,8 +983,8 @@ mod core_test {
985983 "--feedback" ,
986984 "1234" ,
987985 "answer" ,
988- "--feedback-url " ,
989- "http://localhost " ,
986+ "--submission-id " ,
987+ "0 " ,
990988 ] ) ;
991989 }
992990
@@ -999,8 +997,8 @@ mod core_test {
999997 "fi" ,
1000998 "--submission-path" ,
1001999 "path" ,
1002- "--submission-url " ,
1003- "http://localhost " ,
1000+ "--exercise-id " ,
1001+ "0 " ,
10041002 ] ) ;
10051003 }
10061004
@@ -1011,11 +1009,7 @@ mod core_test {
10111009
10121010 #[ test]
10131011 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" ] ) ;
10191013 }
10201014}
10211015
0 commit comments