Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "nightly" # currently points to 3.6-dev
script:
- "python setup.py test"
- coverage run --source=awis setup.py test
after_success:
- coveralls
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build Status](https://travis-ci.org/muhuk/python-awis.svg?branch=master)](https://travis-ci.org/muhuk/python-awis)
Wraps `Alexa Web Information Service`_.

Usage
Expand Down
2 changes: 1 addition & 1 deletion awis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def category_listings(self, path, SortBy="Popularity", Recursive=False, Start=1,
params = {
"Action": "CategoryListings",
"ResponseGroup": "Listings",
"Path": quote(path),
"Path": path,
"SortBy": SortBy,
"Start": str(Start),
"Recursive": str(not not Recursive),
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==2.8.5
coverage==4.0.3
coveralls==1.1
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[aliases]
test=pytest
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from distutils.core import setup
from setuptools import setup
from distutils.command.install import INSTALL_SCHEMES
from awis import __version__, __maintainer__, __email__

Expand All @@ -14,6 +14,8 @@


setup(
setup_requires=['pytest-runner'],
tests_require=['pytest'],
name = 'python-awis',
version = __version__,
url = 'http://github.com/muhuk/python-awis',
Expand Down
3 changes: 3 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import sys, os
sys.path.append(os.path.abspath('.'))

10 changes: 10 additions & 0 deletions test/test_awis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from awis import AwisApi
import os

def test_unicode():
api = AwisApi(os.environ['AWS_ACCESS_ID'], os.environ['AWS_SECRET_ACCESS_KEY'])
tree = api.category_listings("Top/World/Dansk/Børn_og_unge/Kultur")
listings = tree.findall('.//awis:Listing', AwisApi.NS_PREFIXES)

assert len(listings) > 0