<commit_before>module Fog
  module Compute
    class OpenStack
      class Real

        def list_images_detail(filters = {})
          request(
            :expects  => [200, 203],
            :method   => 'GET',
            :path     => 'images/detail.json',
            :query    => filters
          )
        end

      end

      class Mock

        def list_images_detail
          response = Excon::Response.new

          images = self.data[:images].values
          for image in images
            case image['status']
            when 'SAVING'
              if Time.now - self.data[:last_modified][:images][image['id']] >= Fog::Mock.delay
                image['status'] = 'ACTIVE'
              end
            end
          end

          response.status = [200, 203][rand(1)]
          response.body = { 'images' => images.map {|image| image.reject {|key, value| !['id', 'name', 'links', 'minRam', 'minDisk', 'metadata', 'status', 'updated'].include?(key)}} }
          response
        end

      end
    end<commit_msg>Fix test<commit_after>module Fog
  module Compute
    class OpenStack
      class Real

        def list_images_detail(filters = {})
          request(
            :expects  => [200, 203],
            :method   => 'GET',
            :path     => 'images/detail.json',
            :query    => filters
          )
        end

      end

      class Mock

        def list_images_detail(filters = {})
          response = Excon::Response.new

          images = self.data[:images].values
          for image in images
            case image['status']
            when 'SAVING'
              if Time.now - self.data[:last_modified][:images][image['id']] >= Fog::Mock.delay
                image['status'] = 'ACTIVE'
              end
            end
          end

          response.status = [200, 203][rand(1)]
          response.body = { 'images' => images.map {|image| image.reject {|key, value| !['id', 'name', 'links', 'minRam', 'minDisk', 'metadata', 'status', 'updated'].include?(key)}} }
          response
        end

      end
    end
{'fraction_non_alphanumeric': 0.13227513227513227, 'fraction_numerical': 0.012506012506012507, 'mean_word_length': 1.5870646766169154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7246321', 'n_tokens_mistral': 604, 'n_tokens_neox': 570, 'n_words': 138}