anchor.diff:          end
       ),
       init_per_testcase(default, Config);
  -    
  -init_per_testcase(Case, Config) when 
  +
  +init_per_testcase(Case, Config) when
       Case =:= quota_updated_on_gui_upload;
       Case =:= failed_gui_upload_test ->
       Workers = ?config(op_worker_nodes, Config),
       ok = test_utils:mock_new(Workers, cow_multipart),
       ok = test_utils:mock_new(Workers, cowboy_req),
  -    ok = test_utils:mock_expect(Workers, cow_multipart, form_data, 
  +    ok = test_utils:mock_expect(Workers, cow_multipart, form_data,
           fun(_) -> {file, ok, ok, ok} end),
  -    ok = test_utils:mock_expect(Workers, cowboy_req, read_part_body, 
  -        fun F(#{left := 1}=Req, Opts) -> 
  +    ok = test_utils:mock_expect(Workers, cowboy_req, read_part_body,
  +        fun F(#{left := 1}=Req, Opts) ->
                   F(maps:remove(left, Req), Opts);
  -            F(#{left := Left, size := Size} = Req, _Opts) -> 
  +            F(#{left := Left, size := Size} = Req, _Opts) ->
                   {more, crypto:strong_rand_bytes(Size), Req#{left => Left-1}};
  -            F(#{size := Size}=Req, _Opts) -> 
  +            F(#{size := Size}=Req, _Opts) ->
                   {ok, crypto:strong_rand_bytes(Size), Req#{done => true}}
           end),
  -    ok = test_utils:mock_expect(Workers, cowboy_req, read_part, 
  +    ok = test_utils:mock_expect(Workers, cowboy_req, read_part,
           fun (#{done := true} = Req) -> {done, Req}; (Req) -> {ok, [], Req} end),
       init_per_testcase(default, Config);
   
  
positive.code: remove_file_on_remote_provider_should_unlock_space(Config) ->
      #env{p1 = P1, p2 = P2, file1 = File1, file2 = File2} =
          gen_test_env(Config),
      SessId = fun(Worker) -> ?config({session_id, {<<"user1">>, ?GET_DOMAIN(Worker)}}, Config) end,
      
      {ok, _} = create_file(P1, SessId(P1), f(<<"space3">>, File1)),
      {ok, _} = create_file(P1, SessId(P1), f(<<"space3">>, File2)),
      
      ?assertMatch({ok, _}, write_to_file(P1, SessId(P1), f(<<"space3">>, File1), 0, crypto:strong_rand_bytes(20))),
      ?assertMatch({error, ?ENOSPC}, write_to_file(P1, SessId(P1), f(<<"space3">>, File2), 0, crypto:strong_rand_bytes(20))),
  
  
negative.code:     ChunkSize = PartsNumber*PartSize,
      ParamsProp = [{<<"resumableIdentifier">>, <<"id">>}, {<<"parentId">>, ParentGuid},
          {<<"resumableFilename">>, FileName}, {<<"resumableChunkSize">>, integer_to_binary(ChunkSize)}],
  
      utils:pforeach(fun(Chunk) ->
          rpc:call(Worker, page_file_upload, multipart, [#{size => PartSize, left => PartsNumber}, SessionId,
              [{<<"resumableChunkNumber">>, integer_to_binary(Chunk)} | ParamsProp]])
      end, lists:seq(1,ChunksNumber)).
  
  