<commit_before>require "test_helper"
require "bomb_bomb"
require "minitest/mock"

describe "BombBomb API method calls samples" do

  before do
    @email         = "<EMAIL>"
    @pw            = "12345"
    @bomb          = BombBomb::API.new(@email, @pw)

    #Fake Response
    FakeResponse   = Struct.new(:body)
    @response      = FakeResponse.new("{}")
    @mock          = MiniTest::Mock.new
    @mock.expect :body, @response.body
  end

  it "checks if login is valid" do

    Net::HTTP.stub(:post_form, @mock) do
      @bomb.is_valid_login
    end

    assert @mock.verify
  end

  it "gets all lists" do
    Net::HTTP.stub(:post_form, @mock) do
      @bomb.get_lists
    end

    assert @mock.verify
  end

  it "gets contacts of a list" do
    Net::HTTP.stub(:post_form, @mock) do
      @bomb.get_list_contacts( :list_id => "idtolist")
    end

    assert @mock.verify
  end

end<commit_msg>Make test pass<commit_after>require "test_helper"
require "bomb_bomb"
require "curb"
require "minitest/mock"

describe "BombBomb API method calls samples" do

  before do
    @email         = "<EMAIL>"
    @pw            = "12345"
    @bomb          = BombBomb::API.new(@email, @pw)

    #Fake Response
    FakeResponse   = Struct.new(:body_str)
    @response      = FakeResponse.new("{}")
    @mock          = MiniTest::Mock.new
    @mock.expect :body_str, @response.body_str
  end

  it "checks if login is valid" do

    Curl.stub(:post, @mock) do
      @bomb.is_valid_login
    end

    assert @mock.verify
  end

  it "gets all lists" do
    Curl.stub(:post, @mock) do
      @bomb.get_lists
    end

    assert @mock.verify
  end

  it "gets contacts of a list" do
    Curl.stub(:post, @mock) do
      @bomb.get_list_contacts( :list_id => "idtolist")
    end

    assert @mock.verify
  end

end
{'fraction_non_alphanumeric': 0.11666666666666667, 'fraction_numerical': 0.005555555555555556, 'mean_word_length': 2.4435946462715106, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6164191', 'n_tokens_mistral': 662, 'n_tokens_neox': 635, 'n_words': 163}