File python-webunit.spec of Package python-webunit

#
# spec file for package python-webunit
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           python-webunit
Version:        1.3.10
Release:        0
Summary:        Unit test your websites with code that acts like a web browser
License:        MIT
Group:          Development/Languages/Python
Url:            http://mechanicalcat.net/tech/webunit/
Source:         http://pypi.python.org/packages/source/w/webunit/webunit-%{version}.tar.gz
BuildRequires:  python-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
This release includes:

- send correct newline in mimeEncode (thanks Ivan Kurmanov)
- handle Max-Age set to 0 (thanks Matt Chisholm)

Webunit is a framework for unit testing websites:

- Browser-like page fetching including fetching the images and stylesheets
  needed for a page and following redirects
- Cookies stored and trackable (all automatically handled)
- HTTP, HTTPS, GET, POST, basic auth all handled, control over expected
  status codes, ...
- DOM parsing of pages to retrieve and analyse structure, including simple
  form re-posting
- Two-line page-fetch followed by form-submit possible, with error checking
- Ability to register error page content across multiple tests
- Uses python's standard unittest module as the underlying framework
- May also be used to regression-test sites, or ensure their ongoing
  operation once in production (testing login processes work, etc.)

%prep
%setup -q -n webunit-%{version}
chmod -x README.txt

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -r %{buildroot}%{python_sitelib}/demo

%check
python run_tests

%files
%defattr(-,root,root,-)
%doc README.txt demo
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by