<commit_before>require 'rubygems'
require 'test/unit'
require 'mocha/test_unit'
$:.unshift File.dirname(__FILE__) + '/../lib'
require 'openstack'

module TestConnection

def get_test_connection

    conn_response = {'x-server-management-url' => 'http://server-manage.example.com/path', 'x-auth-token' => '<PASSWORD>'}
    conn_response.stubs(:code).returns('204')
    #server = mock(:use_ssl= => true, :verify_mode= => true, :start => true, :finish => true)
    server = mock(:start => true, :finish => true)
    server.stubs(:get => conn_response, :use_ssl= => true, :verify_mode= => true)
    #server.stubs(:get).returns(conn_response)
    Net::HTTP.stubs(:new).returns(server)
    OpenStack::Connection.create(:username => "test_account", :api_key => "<KEY>", :auth_url => "http://a.b.c")

end

end<commit_msg>fixed tests for ensured server.finish change in authentication<commit_after>require 'rubygems'
require 'test/unit'
require 'mocha/test_unit'
$:.unshift File.dirname(__FILE__) + '/../lib'
require 'openstack'

module TestConnection

  def get_test_connection
    conn_response = {'x-server-management-url' => 'http://server-manage.example.com/path', 'x-auth-token' => '<PASSWORD>'}
    conn_response.stubs(:code).returns('204')
    #server = mock(:use_ssl= => true, :verify_mode= => true, :start => true, :finish => true)
    server = mock(:start => true, :finish => true, started?: true)
    server.stubs(:get => conn_response, :use_ssl= => true, :verify_mode= => true)
    #server.stubs(:get).returns(conn_response)
    Net::HTTP.stubs(:new).returns(server)
    OpenStack::Connection.create(:username => "test_account", :api_key => "<KEY>", :auth_url => "http://a.b.c")
  end

end
{'fraction_non_alphanumeric': 0.18901358535144713, 'fraction_numerical': 0.0035440047253396337, 'mean_word_length': 4.943859649122807, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4697450', 'n_tokens_mistral': 573, 'n_tokens_neox': 561, 'n_words': 110}