]>
Commit | Line | Data |
---|---|---|
b5a4b245 | 1 | |
747801e7 | 2 | %define module webunit |
b5a4b245 JB |
3 | |
4 | Summary: Website unit/regression testing tool | |
c183721c | 5 | Summary(pl.UTF-8): Narzędzie do testowania modułów sieci Web |
b5a4b245 JB |
6 | Name: python-%{module} |
7 | Version: 1.3.8 | |
0ae676ed | 8 | Release: 3 |
b5a4b245 | 9 | License: BSD-like |
364cf66c | 10 | Group: Libraries/Python |
b5a4b245 JB |
11 | Source0: http://www.mechanicalcat.net/tech/webunit/%{module}-%{version}.tar.gz |
12 | # Source0-md5: 97b9e6b5149dadce48b86adbf2db3b0a | |
13 | URL: http://www.mechanicalcat.net/tech/webunit/ | |
22b8a02c | 14 | BuildRequires: python-devel >= 1:2.3 |
a8d1b658 | 15 | BuildRequires: python-modules |
16 | BuildRequires: rpm-pythonprov | |
b5a4b245 | 17 | Requires: python >= 2.3 |
3353dd5d | 18 | BuildArch: noarch |
b5a4b245 JB |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | webunit test your websites with code that acts like a web browser. | |
23 | ||
24 | Features in a nutshell: | |
25 | ||
26 | 1. Browser-like page fetching including fetching the images and | |
27 | stylesheets needed for a page and following redirects | |
28 | 2. Cookies stored and trackable (all automatically handled) | |
29 | 3. HTTP, HTTPS, GET, POST, basic auth all handled, control over | |
30 | expected status codes, ... | |
31 | 4. DOM parsing of pages to retrieve and analyse structure, including | |
32 | simple form re-posting | |
33 | 5. Two-line page-fetch followed by form-submit possible, with error | |
34 | checking | |
35 | 6. Ability to register error page content across multiple tests | |
36 | 7. Uses python's standard unittest module as the underlying framework | |
37 | ||
4250ccbf JR |
38 | %description -l pl.UTF-8 |
39 | webunit używany jest do testowania stron WWW przy pomocy kodu | |
40 | symulującego działanie przeglądarki internetowej. | |
b5a4b245 JB |
41 | |
42 | Cechy webunit: | |
43 | ||
4250ccbf JR |
44 | 1. Pobieranie stron WWW symulujące działanie przeglądarki |
45 | internetowej, pobieranie obrazków i styli, podążanie za | |
b5a4b245 | 46 | przekierowaniami. |
4250ccbf JR |
47 | 2. Automatyczna obsługa ciasteczek (cookies). |
48 | 3. Obsługa protokołów HTTP, HTTPS, metod GET, POST, uwierzytelniania, | |
49 | kontrola oczekiwanych kodów statusu. | |
b5a4b245 | 50 | 4. Parsowanie struktury DOM stron w celu pobrania i analizy strony, |
4250ccbf JR |
51 | także w celu łatwego odsyłania formularzy. |
52 | 5. Dwutorowe pobieranie strony kończone wysyłką formularza wraz ze | |
53 | sprawdzaniem błędów. | |
54 | 6. Możliwość określenia zawartości strony z błędem przy przechodzeniu | |
b5a4b245 | 55 | przez kolejne testy. |
4250ccbf | 56 | 7. Użycie standardowego modułu pythona unittest jako zasadniczego |
b5a4b245 JB |
57 | szkieletu testu. |
58 | ||
59 | %prep | |
60 | %setup -q -n %{module}-%{version} | |
61 | ||
62 | %build | |
63 | python setup.py build_ext | |
64 | ||
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | install -d $RPM_BUILD_ROOT%{py_sitescriptdir} | |
68 | ||
69 | python setup.py install \ | |
70 | --root=$RPM_BUILD_ROOT \ | |
71 | --install-lib=%{py_sitescriptdir} \ | |
72 | --optimize=2 | |
73 | ||
74 | find $RPM_BUILD_ROOT%{py_sitescriptdir} -name \*.py -exec rm {} \; | |
75 | ||
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
81 | %doc CHANGES.txt demo README.txt run_tests | |
82 | %{py_sitescriptdir}/webunit |