control 'python34' do
  attribute_file = '/tmp/kitchen/node_attributes.json'
  if file(attribute_file).exist?
    node = json(attribute_file).params
    case node['automatic']['platform_family']
    when 'rhel'
      if node['automatic']['platform_version'].to_s.start_with?('7')
        describe command 'python3.4 -V' do
          its('exit_status') { should eq 0 }
        end
        packages = %w(
          python34u
          python34u-libs
          python34u-devel
          python34u-pip
        )

        packages.each do |name|
          describe package name do
            it { should be_installed }
          end
        end

      end
    end
  end
end
