From 71bef1b7b7fb2ef8176d2a98a59dc1c14ecc5c49 Mon Sep 17 00:00:00 2001 From: Phylante Date: Thu, 1 Oct 2015 17:40:39 +0200 Subject: [PATCH 1/3] pep8 --- doc/Getting started.rst | 28 +++++++++--------- doc/Shiba.rst | 18 ++++++------ doc/index.rst | 4 +-- setup.py | 18 ++++++------ shiba/accountingmanagement.py | 5 ++-- shiba/marketplacemanagement.py | 10 +++---- shiba/salesmanagement.py | 2 +- shiba/shibaconnection.py | 54 +++++++++++++++++++--------------- shiba/shibatools.py | 25 ++++++++-------- 9 files changed, 86 insertions(+), 78 deletions(-) diff --git a/doc/Getting started.rst b/doc/Getting started.rst index 6951fba..7877d20 100644 --- a/doc/Getting started.rst +++ b/doc/Getting started.rst @@ -26,31 +26,31 @@ First, import the main *Shiba* module, and create an instance of the *shibaconne Then all you have to do is importing the management module you wish to work with, giving it your instanced connection class, and start dealing with those WebServices through its methods. I want an example! ------------------------------- +------------------ .. highlight:: python This example will show you how to get new sales information on your seller account:: - from Shiba.shibaconnection import ShibaConnection - from Shiba.salesmanagement import SalesManagement + from Shiba.shibaconnection import ShibaConnection + from Shiba.salesmanagement import SalesManagement - init = ShibaConnection("mysellerlogin", "mytokenpwd"[, sandbox=True """For testing purpose only (use Sandbox IDs)"""]) - salestool = SalesManagement(init) - newsales = salestool.get_new_sales() + init = ShibaConnection("mysellerlogin", "mytokenpwd"[, sandbox=True """For testing purpose only (use Sandbox IDs)"""]) + salestool = SalesManagement(init) + newsales = salestool.get_new_sales() Now you can scroll the `ShibaResponseObject` object returned by the method:: - purchaseid = newsales.content.response.sales.sale[0].purchaseid # Getting the first sale on the list, retrieving the purchase ID - purchasedate = newsales.content.response.sales.sale[0].purchasedate # Retrieving the purchase date - for each in newsales.content.iterchildren(): - print each.tag # Will print each tag nodes from the first level - print newsales.namespace # Will print the current namespace (not that useful, but can help for some cases of further development) - print newsales.rawxml # Display the whole XML returned from WebServices and processed by Shiba + purchaseid = newsales.content.response.sales.sale[0].purchaseid # Getting the first sale on the list, retrieving the purchase ID + purchasedate = newsales.content.response.sales.sale[0].purchasedate # Retrieving the purchase date + for each in newsales.content.iterchildren(): + print each.tag # Will print each tag nodes from the first level + print newsales.namespace # Will print the current namespace (not that useful, but can help for some cases of further development) + print newsales.rawxml # Display the whole XML returned from WebServices and processed by Shiba And here we go! All you have to do is to find the methods fitting your needs. Testing ----------- +------- Shiba comes with its tests, both offline and online ones. *New in 1.1.2*: Tests now running with mock. @@ -60,7 +60,7 @@ Offline testing Move into the *offline* subdirectory of *tests/*, and simply run *nosetests*. Online testing -^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^ If you want to run online test, you will primary need to get a **PriceMinister sandbox account** in order to proceed. Then open up the *tests/online/Assets/nosetests.cfg* file and fill it up with your sandbox **login** and **token** (not password). diff --git a/doc/Shiba.rst b/doc/Shiba.rst index bbee7b7..1cac377 100644 --- a/doc/Shiba.rst +++ b/doc/Shiba.rst @@ -1,8 +1,8 @@ Shiba, from A to Z -=================== +================== About Shiba sub management modules ------------------------------------ +---------------------------------- All submodules included from the main **Shiba** package needs an instanced *ShibaConnection* class defining your login and an identification token as parameter. @@ -19,7 +19,7 @@ You can find some documentation about it looking into the lxml documentation_. .. _documentation: http://lxml.de/objectify.html AccountingManagement module ---------------------------------- +--------------------------- .. automodule:: shiba.accountingmanagement :members: @@ -27,7 +27,7 @@ AccountingManagement module :show-inheritance: InventoryManagement module --------------------------------- +-------------------------- .. automodule:: shiba.inventorymanagement :members: @@ -35,7 +35,7 @@ InventoryManagement module :show-inheritance: MarketplaceManagement module ----------------------------------- +---------------------------- .. automodule:: shiba.marketplacemanagement :members: @@ -43,7 +43,7 @@ MarketplaceManagement module :show-inheritance: SalesManagement module ----------------------------- +---------------------- .. automodule:: shiba.salesmanagement :members: @@ -51,7 +51,7 @@ SalesManagement module :show-inheritance: ShibaResponseObject module ----------------------------- +-------------------------- Containing the object class returned by each method of the modules above. .. automodule:: shiba.shibaresponseobject @@ -60,7 +60,7 @@ Containing the object class returned by each method of the modules above. :show-inheritance: Shiba login ShibaConnection class ------------------------------------ +--------------------------------- .. automodule:: Shiba.shibaconnection :members: @@ -68,7 +68,7 @@ Shiba login ShibaConnection class :show-inheritance: Shiba exception classes ----------------------------- +----------------------- .. automodule:: shiba.shibaexceptions :members: diff --git a/doc/index.rst b/doc/index.rst index 57a0694..5ebd699 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -15,13 +15,13 @@ This is the documentation for the `Shiba API`_ project on GitHub. Hope you will find what you're looking for! What is Shiba? --------------------- +-------------- **Shiba** is an API intended to bring an human handlable utilisation of the **PriceMinister WebServices** with **Python**. It works through modules, imported to your scripts to fit your needs. Contents -____________________ +________ .. toctree:: :maxdepth: 2 diff --git a/setup.py b/setup.py index 1222f5f..0c6ca92 100644 --- a/setup.py +++ b/setup.py @@ -5,13 +5,13 @@ from setuptools import setup -setup(name= "Shiba", - packages= ["shiba"], - version = "1.1.2", - description= "A Python API for PriceMinister WebServices", - author= "Maxime Boguta", - author_email= "maxime.boguta@epitech.eu", - url= "https://github.com/ShibaAPI/shiba", - download_url= "https://github.com/ShibaAPI/shiba/tarball/1.1.2", - keywords= ["api", "priceminister", "python", "webservices"], +setup(name="Shiba", + packages=["shiba"], + version="1.1.2", + description="A Python API for PriceMinister WebServices", + author="Maxime Boguta", + author_email="maxime.boguta@epitech.eu", + url="https://github.com/ShibaAPI/shiba", + download_url="https://github.com/ShibaAPI/shiba/tarball/1.1.2", + keywords=["api", "priceminister", "python", "webservices"], install_requires=["requests", "xmltodict", "lxml", "nose"],) diff --git a/shiba/accountingmanagement.py b/shiba/accountingmanagement.py index e1d32ee..2dfada9 100644 --- a/shiba/accountingmanagement.py +++ b/shiba/accountingmanagement.py @@ -17,7 +17,8 @@ class AccountingManagement(object): """Accounting Management class, showing global financial operations on your account, or specific financial details about an operation""" def __init__(self, connection): - assert(isinstance(connection, ShibaConnection)), "error : you must give this instance a ShibaConnection instance" + assert(isinstance(connection, ShibaConnection)),\ + "error : you must give this instance a ShibaConnection instance" self.connection = connection def get_operations(self, lastoperationdate=""): @@ -43,4 +44,4 @@ def get_compensation_details(self, compensationid): inf = ShibaTools.inf_constructor(self.connection, "getcompensationdetails", **locals()) url = ShibaTools.url_constructor(self.connection, inf) obj = ShibaTools.retrieve_obj_from_url(url) - return obj \ No newline at end of file + return obj diff --git a/shiba/marketplacemanagement.py b/shiba/marketplacemanagement.py index 13746fb..e55c7f7 100644 --- a/shiba/marketplacemanagement.py +++ b/shiba/marketplacemanagement.py @@ -33,10 +33,10 @@ def get_product_list(self, scope="", kw="", nav="", refs="", productids="", nbpr """ if (type(refs) is not list and type(refs) is not str and type(refs) is not unicode) or \ (type(productids) is not list and type(productids) is not str and type(productids) is not unicode): - raise ShibaCallingError \ - ("Shiba code error : expected list or str/unicode as refs and/or productids parameters" - ", got " + unicode(type(refs)) + " as refs and " + unicode(type(productids)) - + " as productids instead.") + raise ShibaCallingError( + "Shiba code error : expected list or str/unicode as refs and/or productids parameters, got " + + unicode(type(refs)) + " as refs and " + unicode(type(productids)) + + " as productids instead.") if type(refs) is list: refs = ','.join(refs) if type(productids) is list: @@ -51,4 +51,4 @@ def get_category_map(self): inf = ShibaTools.inf_constructor(self.connection, "categorymap", **locals()) url = ShibaTools.url_constructor(self.connection, inf, domain="http://ws.priceminister.com") obj = ShibaTools.retrieve_obj_from_url(url) - return obj \ No newline at end of file + return obj diff --git a/shiba/salesmanagement.py b/shiba/salesmanagement.py index 7fda51d..3ca97df 100644 --- a/shiba/salesmanagement.py +++ b/shiba/salesmanagement.py @@ -175,4 +175,4 @@ def confirm_preorder(self, advertid, stock): inf = ShibaTools.inf_constructor(self.connection, "confirmpreorder", **locals()) url = ShibaTools.url_constructor(self.connection, inf) obj = ShibaTools.retrieve_obj_from_url(url) - return obj \ No newline at end of file + return obj diff --git a/shiba/shibaconnection.py b/shiba/shibaconnection.py index 7542644..50a9bf7 100644 --- a/shiba/shibaconnection.py +++ b/shiba/shibaconnection.py @@ -23,27 +23,33 @@ def __init__(self, login, pwd, sandbox=False): self.login = str(login) self.pwd = str(pwd) self.domain = "https://ws.priceminister.com" if sandbox is False else "https://ws.sandbox.priceminister.com" - self.actionsinfo = \ - {"producttypes": {"cat": "stock_ws", "version": "2011-11-29", "login": self.login, "pwd": self.pwd}, - "producttypetemplate": {"cat": "stock_ws", "version": "2013-05-14", "login": self.login, "pwd": self.pwd}, - "genericimportfile": {"cat": "stock_ws", "version": "2012-09-11", "login": self.login, "pwd": self.pwd}, - "genericimportreport": {"cat": "stock_ws", "version": "2011-11-29", "login": self.login, "pwd": self.pwd}, - "getavailableshippingtypes": {"cat": "sales_ws", "version": "2013-06-25", "login": self.login, "pwd": self.pwd}, - "export": {"cat": "stock_ws", "version": "2014-01-28", "login": self.login, "pwd": self.pwd}, - "listing": {"cat": "listing_ws", "version": "2014-01-28", "login": self.login, "pwd": self.pwd}, - "categorymap": {"cat": "categorymap_ws", "version": "2011-10-11", "login": self.login, "pwd": self.pwd}, - "getnewsales": {"cat": "sales_ws", "version": "2014-02-11", "login": self.login, "pwd": self.pwd}, - "acceptsale": {"cat": "sales_ws", "version": "2010-09-20", "login": self.login, "pwd": self.pwd}, - "refusesale": {"cat": "sales_ws", "version": "2010-09-20", "login": self.login, "pwd": self.pwd}, - "getcurrentsales": {"cat": "sales_ws", "version": "2014-02-11", "login": self.login, "pwd": self.pwd}, - "getbillinginformation": {"cat": "sales_ws", "version": "2011-03-29", "login": self.login, "pwd": self.pwd}, - "getshippinginformation": {"cat": "sales_ws", "version": "2014-02-11", "login": self.login, "pwd": self.pwd}, - "getitemtodolist": {"cat": "sales_ws", "version": "2011-09-01", "login": self.login, "pwd": self.pwd}, - "getiteminfos": {"cat": "sales_ws", "version": "2011-06-01", "login": self.login, "pwd": self.pwd}, - "cancelitem": {"cat": "sales_ws", "version": "2011-02-02", "login": self.login, "pwd": self.pwd}, - "contactusaboutitem": {"cat": "sales_ws", "version": "2011-09-01", "login": self.login, "pwd": self.pwd}, - "contactuseraboutitem": {"cat": "sales_ws", "version": "2011-02-02", "login": self.login, "pwd": self.pwd}, - "settrackingpackageinfos": {"cat": "sales_ws", "version": "2012-11-06", "login": self.login, "pwd": self.pwd}, - "confirmpreorder": {"cat": "sales_ws", "version": "2013-01-09", "login": self.login, "pwd": self.pwd}, - "getoperations": {"cat": "wallet_ws", "version": "2011-03-29", "login": self.login, "pwd": self.pwd}, - "getcompensationdetails": {"cat": "sales_ws", "version": "2011-03-29", "login": self.login, "pwd": self.pwd}} \ No newline at end of file + self.actionsinfo = { + "producttypes": {"cat": "stock_ws", "version": "2011-11-29", "login": self.login, "pwd": self.pwd}, + "producttypetemplate": {"cat": "stock_ws", "version": "2013-05-14", "login": self.login, "pwd": self.pwd}, + "genericimportfile": {"cat": "stock_ws", "version": "2012-09-11", "login": self.login, "pwd": self.pwd}, + "genericimportreport": {"cat": "stock_ws", "version": "2011-11-29", "login": self.login, "pwd": self.pwd}, + "getavailableshippingtypes": {"cat": "sales_ws", "version": "2013-06-25", "login": self.login, + "pwd": self.pwd}, + "export": {"cat": "stock_ws", "version": "2014-01-28", "login": self.login, "pwd": self.pwd}, + "listing": {"cat": "listing_ws", "version": "2014-01-28", "login": self.login, "pwd": self.pwd}, + "categorymap": {"cat": "categorymap_ws", "version": "2011-10-11", "login": self.login, "pwd": self.pwd}, + "getnewsales": {"cat": "sales_ws", "version": "2014-02-11", "login": self.login, "pwd": self.pwd}, + "acceptsale": {"cat": "sales_ws", "version": "2010-09-20", "login": self.login, "pwd": self.pwd}, + "refusesale": {"cat": "sales_ws", "version": "2010-09-20", "login": self.login, "pwd": self.pwd}, + "getcurrentsales": {"cat": "sales_ws", "version": "2014-02-11", "login": self.login, "pwd": self.pwd}, + "getbillinginformation": {"cat": "sales_ws", "version": "2011-03-29", "login": self.login, + "pwd": self.pwd}, + "getshippinginformation": {"cat": "sales_ws", "version": "2014-02-11", "login": self.login, + "pwd": self.pwd}, + "getitemtodolist": {"cat": "sales_ws", "version": "2011-09-01", "login": self.login, "pwd": self.pwd}, + "getiteminfos": {"cat": "sales_ws", "version": "2011-06-01", "login": self.login, "pwd": self.pwd}, + "cancelitem": {"cat": "sales_ws", "version": "2011-02-02", "login": self.login, "pwd": self.pwd}, + "contactusaboutitem": {"cat": "sales_ws", "version": "2011-09-01", "login": self.login, "pwd": self.pwd}, + "contactuseraboutitem": {"cat": "sales_ws", "version": "2011-02-02", "login": self.login, "pwd": self.pwd}, + "settrackingpackageinfos": {"cat": "sales_ws", "version": "2012-11-06", "login": self.login, + "pwd": self.pwd}, + "confirmpreorder": {"cat": "sales_ws", "version": "2013-01-09", "login": self.login, "pwd": self.pwd}, + "getoperations": {"cat": "wallet_ws", "version": "2011-03-29", "login": self.login, "pwd": self.pwd}, + "getcompensationdetails": {"cat": "sales_ws", "version": "2011-03-29", "login": self.login, + "pwd": self.pwd} + } diff --git a/shiba/shibatools.py b/shiba/shibatools.py index 521eb90..86b0ca0 100644 --- a/shiba/shibatools.py +++ b/shiba/shibatools.py @@ -25,8 +25,9 @@ import requests import xmltodict - """Tools used by Shiba data retrieving classes""" + + class ShibaTools(object): @staticmethod def __errors_check(obj): @@ -39,20 +40,20 @@ def __errors_check(obj): if "errorresponse" in obj.tag: if "ServerError" == obj.error.code: raise ShibaParameterError("Parameter error : " + obj.error.message + - " - Reason : " + obj.error.details.detail) + " - Reason : " + obj.error.details.detail) if "ParameterError" == obj.error.code: raise ShibaParameterError("Parameter error : " + obj.error.message + - " - Reason : " + obj.error.details.detail) + " - Reason : " + obj.error.details.detail) if "InvalidUserConnection" == obj.error.code: raise ShibaLoginError("Invalid user connection : " + obj.error.message + - " - Reason : " + obj.error.details.detail) + " - Reason : " + obj.error.details.detail) if "InvalidUserRights" == obj.error.code: if "Quota exceeded" in obj.error.message.text: raise ShibaQuotaExceededError("Too many requests : " + obj.error.message + - " - Reason : " + obj.error.details.detail) + " - Reason : " + obj.error.details.detail) else: raise ShibaRightsError("Invalid user rights : " + obj.error.message + - " - Reason : " + obj.error.details.detail) + " - Reason : " + obj.error.details.detail) return obj return False @@ -65,13 +66,12 @@ def post_request(url, data): :rtype: plain text from servers response """ header = {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; de-DE; rv:1.9.0.10) " - "Gecko/2009042316 Firefox/3.0.10 (.NET CLR 4.0.20506)"} + "Gecko/2009042316 Firefox/3.0.10 (.NET CLR 4.0.20506)"} data = data.encode('utf-8') d = {"file": data} r = requests.post(url, files=d, headers=header) return r.text - @staticmethod def retrieve_obj_from_url(url, data=None): """Give it an URL, will send you back an object based on received XML from WebService, it removes and store @@ -110,7 +110,8 @@ def retrieve_obj_from_url(url, data=None): xmlepured = xmlepured.encode('utf-8') obj = objectify.fromstring(xmlepured) except: - raise ShibaUnknownServiceError("Unknown error from service or from internal modules : Service returned : " + xml) + raise ShibaUnknownServiceError( + "Unknown error from service or from internal modules : Service returned : " + xml) if ShibaTools.__errors_check(obj) is not False: try: if "Unknown error" == obj.error.code: @@ -121,7 +122,7 @@ def retrieve_obj_from_url(url, data=None): " : " + obj.error.message + " - Reason : " + obj.error.details.detail) except: raise ShibaUnknownServiceError("An unknown error from the WebService has occurred - XML dump : " + - etree.tostring(obj)) + etree.tostring(obj)) return ShibaResponseObject(namespace, obj, xml.encode('utf-8')) @staticmethod @@ -160,8 +161,8 @@ def inf_constructor(shibaconnection, action, **kwargs): raise ShibaCallingError("Internal parameter error : shibaconnection parameter is not " "a ShibaConnection instance") if action not in shibaconnection.actionsinfo: - raise ShibaCallingError("Internal parameter error : action parameter " - + action + " is unknown from the actions list") + raise ShibaCallingError("Internal parameter error : action parameter " + + action + " is unknown from the actions list") newkwargs = {} for each in kwargs: if kwargs[each] is not None and kwargs[each] != "": From 12ebfcc7ba31b46db7a62a5073db5b9251744bf1 Mon Sep 17 00:00:00 2001 From: Phylante Date: Fri, 2 Oct 2015 15:05:59 +0200 Subject: [PATCH 2/3] listing action now uses https + fixed some assertions in the tests to be more verbose. --- shiba/marketplacemanagement.py | 2 +- shiba/shibaconnection.py | 2 +- tests/offline/test_accountingmanagement.py | 12 +++---- tests/offline/test_inventorymanagement.py | 13 ++++--- tests/offline/test_marketplacemanagement.py | 6 ++-- tests/offline/test_salesmanagement.py | 28 +++++++-------- tests/offline/test_shibatools.py | 13 +++---- tests/online/test_accountingmanagement.py | 16 ++++----- tests/online/test_inventorymanagement.py | 21 +++++------ tests/online/test_marketplacemanagement.py | 13 +++---- tests/online/test_salesmanagement.py | 39 +++++++++++---------- tests/online/test_shibatools.py | 31 ++++++++++------ 12 files changed, 102 insertions(+), 94 deletions(-) diff --git a/shiba/marketplacemanagement.py b/shiba/marketplacemanagement.py index e55c7f7..cb72b5d 100644 --- a/shiba/marketplacemanagement.py +++ b/shiba/marketplacemanagement.py @@ -42,7 +42,7 @@ def get_product_list(self, scope="", kw="", nav="", refs="", productids="", nbpr if type(productids) is list: productids = ','.join(productids) inf = ShibaTools.inf_constructor(self.connection, "listing", **locals()) - url = ShibaTools.url_constructor(self.connection, inf, domain="http://ws.priceminister.com") + url = ShibaTools.url_constructor(self.connection, inf, domain="https://ws.priceminister.com") obj = ShibaTools.retrieve_obj_from_url(url) return obj diff --git a/shiba/shibaconnection.py b/shiba/shibaconnection.py index 50a9bf7..3f30014 100644 --- a/shiba/shibaconnection.py +++ b/shiba/shibaconnection.py @@ -31,7 +31,7 @@ def __init__(self, login, pwd, sandbox=False): "getavailableshippingtypes": {"cat": "sales_ws", "version": "2013-06-25", "login": self.login, "pwd": self.pwd}, "export": {"cat": "stock_ws", "version": "2014-01-28", "login": self.login, "pwd": self.pwd}, - "listing": {"cat": "listing_ws", "version": "2014-01-28", "login": self.login, "pwd": self.pwd}, + "listing": {"cat": "listing_ssl_ws", "version": "2015-07-05", "login": self.login, "pwd": self.pwd}, "categorymap": {"cat": "categorymap_ws", "version": "2011-10-11", "login": self.login, "pwd": self.pwd}, "getnewsales": {"cat": "sales_ws", "version": "2014-02-11", "login": self.login, "pwd": self.pwd}, "acceptsale": {"cat": "sales_ws", "version": "2010-09-20", "login": self.login, "pwd": self.pwd}, diff --git a/tests/offline/test_accountingmanagement.py b/tests/offline/test_accountingmanagement.py index 04a4291..c106536 100644 --- a/tests/offline/test_accountingmanagement.py +++ b/tests/offline/test_accountingmanagement.py @@ -10,16 +10,12 @@ from shiba.accountingmanagement import AccountingManagement from shiba.shibaconnection import ShibaConnection -from shiba.shibaexceptions import * import os -import ConfigParser import unittest import mock -from datetime import date - def mock_get_operations(*args, **kwargs): datas = open(os.path.join(os.path.dirname(__file__), 'Assets/sample_getoperations.xml')) @@ -40,12 +36,12 @@ def setUp(self): def test_get_operations(self, urlopen): """get_operations routine test""" obj = self.init.get_operations() - self.assertTrue("getoperationsresult" in obj.content.tag) - self.assertTrue(obj.content.request.user == "vendeur") - self.assertTrue(obj.content.request.operationcause == "salestransfer") + self.assertIn("getoperationsresult", obj.content.tag) + self.assertEqual(obj.content.request.user, "vendeur") + self.assertEqual(obj.content.request.operationcause, "salestransfer") @mock.patch('urllib2.urlopen', side_effect=mock_get_compensation_details) def test_get_compensation_details(self, urlopen): """get_compensation_details test""" obj = self.init.get_compensation_details("1337") - self.assertTrue(obj.content.tag == "getcompensationdetailsresult") + self.assertEqual(obj.content.tag, "getcompensationdetailsresult") diff --git a/tests/offline/test_inventorymanagement.py b/tests/offline/test_inventorymanagement.py index 63e31d5..2f89621 100644 --- a/tests/offline/test_inventorymanagement.py +++ b/tests/offline/test_inventorymanagement.py @@ -10,7 +10,6 @@ from shiba.inventorymanagement import InventoryManagement from shiba.shibaconnection import ShibaConnection -from shiba.shibaexceptions import * import xmltodict from lxml import objectify @@ -54,14 +53,14 @@ def setUp(self): def test_product_types(self, urlopen): """product_types return test""" ptypes = self.init.product_types() - self.assertTrue("producttypesresult" in ptypes.content.tag) + self.assertIn("producttypesresult", ptypes.content.tag) @mock.patch('urllib2.urlopen', side_effect=mock_product_type_template) def test_product_type_template(self, urlopen): """product_type_template tests on two scopes, for a fixed alias, plus a fail result""" alias = "insolites_produit" ptemplate = self.init.product_type_template(alias, "") - self.assertTrue("producttypetemplateresult" in ptemplate.content.tag) + self.assertIn("producttypetemplateresult", ptemplate.content.tag) @mock.patch('shiba.shibatools.ShibaTools.post_request', side_effect=mock_generic_import_file) def test_generic_import_file(self, post_request): @@ -70,18 +69,18 @@ def test_generic_import_file(self, post_request): f = open(os.path.dirname(os.path.realpath(__file__)) + "/Assets/genericimportfile.xml", "rb") testdict = xmltodict.parse(f) ret = self.init.generic_import_file(testdict) - self.assertTrue("OK" == ret.content.response.status) + self.assertEqual("OK", ret.content.response.status) f = open(os.path.dirname(os.path.realpath(__file__)) + "/Assets/genericimportfile.xml", "rb") testobj = objectify.parse(f) ret = self.init.generic_import_file(testobj) - self.assertTrue("OK" == ret.content.response.status) + self.assertEqual("OK", ret.content.response.status) @mock.patch('urllib2.urlopen', side_effect=mock_get_available_shipping_types) def test_get_available_shipping_types(self, urlopen): obj = self.init.get_available_shipping_types() - self.assertTrue("getavailableshippingtypesresult" in obj.content.tag) + self.assertIn("getavailableshippingtypesresult", obj.content.tag) @mock.patch('urllib2.urlopen', side_effect=mock_export_inventory) def test_export_inventory(self, urlopen): obj = self.init.export_inventory() - self.assertTrue("inventoryresult" in obj.content.tag) \ No newline at end of file + self.assertIn("inventoryresult", obj.content.tag) diff --git a/tests/offline/test_marketplacemanagement.py b/tests/offline/test_marketplacemanagement.py index 917b8b2..69a4165 100644 --- a/tests/offline/test_marketplacemanagement.py +++ b/tests/offline/test_marketplacemanagement.py @@ -41,16 +41,16 @@ def test_get_product_list(self, urlopen): except ShibaParameterError: pass obj = self.init.get_product_list(kw="livre") - self.assertTrue("listingresult" in obj.content.tag) + self.assertIn("listingresult", obj.content.tag) try: obj = self.init.get_product_list(nbproductsperpage=-15, kw="livre") except ShibaParameterError: pass obj = self.init.get_product_list(kw="informatique", scope="PRICING") - self.assertTrue("listingresult" in obj.content.tag) + self.assertIn("listingresult", obj.content.tag) @mock.patch('urllib2.urlopen', side_effect=mock_get_category_map) def test_get_category_map(self, urlopen): """get_category_map regular test""" obj = self.init.get_category_map() - self.assertTrue("categorymap" in obj.content.tag) \ No newline at end of file + self.assertIn("categorymap", obj.content.tag) diff --git a/tests/offline/test_salesmanagement.py b/tests/offline/test_salesmanagement.py index 46447dd..3fda422 100644 --- a/tests/offline/test_salesmanagement.py +++ b/tests/offline/test_salesmanagement.py @@ -89,7 +89,7 @@ def setUp(self): def test_get_new_sales(self, urlopen): """regular get_new_sales test""" obj = self.init.get_new_sales() - self.assertTrue("getnewsalesresult" in obj.content.tag) + self.assertIn("getnewsalesresult", obj.content.tag) @mock.patch('urllib2.urlopen', side_effect=mock_accept_sale) def test_accept_sale(self, urlopen): @@ -119,8 +119,8 @@ def test_refuse_sale(self, urlopen): def test_get_current_sales(self, urlopen): """get_current_sales test, on variable parameters, plus some fail results""" obj = self.init.get_current_sales() - self.assertTrue("getcurrentsalesresult" in obj.content.tag) - self.assertTrue(False == obj.content.request.ispendingpreorder) + self.assertIn("getcurrentsalesresult", obj.content.tag) + self.assertFalse(obj.content.request.ispendingpreorder) try: self.init.get_current_sales(ispendingpreorder="n") except ShibaCallingError: @@ -132,65 +132,65 @@ def test_get_current_sales(self, urlopen): def test_get_billing_information(self, urlopen): """get_billing_information test, will raise an error due to unknown purchaseid""" obj = self.init.get_billing_information("1337") - self.assertTrue(obj.content.tag == "getbillinginformationresult") + self.assertEqual(obj.content.tag, "getbillinginformationresult") @mock.patch('urllib2.urlopen', side_effect=mock_get_shipping_information) def test_get_shipping_information(self, urlopen): """get_billing_information test""" obj = None obj = self.init.get_shipping_information("1337") - self.assertTrue(obj.content.tag == "getshippinginformationresult") + self.assertEqual(obj.content.tag, "getshippinginformationresult") @mock.patch('urllib2.urlopen', side_effect=mock_get_items_todo_list) def test_get_items_todo_list(self, urlopen): """get_items_todo_list routine test""" obj = self.init.get_item_todo_list() - self.assertTrue("getitemtodolistresult" in obj.content.tag) + self.assertIn("getitemtodolistresult", obj.content.tag) @mock.patch('urllib2.urlopen', side_effect=mock_get_item_infos) def test_get_item_infos(self, urlopen): """get_item_infos on a product""" obj = self.init.get_item_infos("181063") - self.assertTrue(obj.content.tag == "getiteminfosresult") + self.assertEqual(obj.content.tag, "getiteminfosresult") @mock.patch('urllib2.urlopen', side_effect=mock_cancel_item) def test_cancel_item(self, urlopen): """cancel_item test""" obj = self.init.cancel_item("1337", "comment") - self.assertTrue(obj.content.tag == "cancelitemresult") + self.assertEqual(obj.content.tag, "cancelitemresult") @mock.patch('urllib2.urlopen', side_effect=mock_contactus) def test_contact_us_about_item(self, urlopen): """contact_us_about_item test""" obj = self.init.contact_us_about_item("1337", "message", "1337") - self.assertTrue(obj.content.tag == "contactusaboutitemresult") + self.assertEqual(obj.content.tag, "contactusaboutitemresult") @mock.patch('urllib2.urlopen', side_effect=mock_contactuser) def test_contact_user_about_item(self, urlopen): """contact_user_about_item on a product""" obj = self.init.contact_user_about_item("1337", "message") - self.assertTrue(obj.content.tag == "contactuseraboutitemresult") + self.assertEqual(obj.content.tag, "contactuseraboutitemresult") @mock.patch('urllib2.urlopen', side_effect=mock_set_tracking_package_infos) def test_set_tracking_package_infos(self, urlopen): """set_tracking_package_infos on a product. Testing internal error catching as well.""" obj = self.init.set_tracking_package_infos("1337", "UPS", "0000000000") - self.assertTrue(obj.content.tag == "setshippingpackageinfosresult") + self.assertEqual(obj.content.tag, "setshippingpackageinfosresult") obj = None try: obj = self.init.set_tracking_package_infos("1337", "Autre", "0000000000") except ShibaCallingError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) @mock.patch('urllib2.urlopen', side_effect=mock_confirm_preorder) def test_confirm_preorder(self, urlopen): """confirm_preorder on an advert. Testing internal error catching as well.""" obj = self.init.confirm_preorder("1337", 1) - self.assertTrue(obj.content.tag == "confirmpreorder") + self.assertEqual(obj.content.tag, "confirmpreorder") obj = None try: obj = self.init.confirm_preorder("1337", -8) except ShibaCallingError: pass - self.assertTrue(obj is None) \ No newline at end of file + self.assertIsNone(obj) diff --git a/tests/offline/test_shibatools.py b/tests/offline/test_shibatools.py index 52daadf..9e91504 100644 --- a/tests/offline/test_shibatools.py +++ b/tests/offline/test_shibatools.py @@ -37,7 +37,7 @@ def setUp(self): def test_retrieve_obj_from_url(self, urlopen): """retrieve_obj_from_url test with a remote XML file""" obj = self.init.retrieve_obj_from_url("http://www.w3schools.com/xml/note.xml") - self.assertTrue("note" in obj.content.tag) + self.assertIn("note", obj.content.tag) self.assertTrue("to" in obj.content.to.tag and obj.content.to == "Tove") self.assertTrue("heading" in obj.content.heading.tag and obj.content.heading == "Reminder") self.assertTrue("body" in obj.content.body.tag and obj.content.body == "Don't forget me this weekend!") @@ -50,16 +50,18 @@ def test_inf_constructor(self): connection = ShibaConnection("test", "test") action = "genericimportreport" ret = self.init.inf_constructor(connection, action, inf1="info1", inf2="info2") - self.assertTrue("inf1" in ret and "inf2" in ret) - self.assertTrue(ret["inf1"] == "info1" and ret["action"] == "genericimportreport") + self.assertIn("inf1", ret) + self.assertIn("inf2", ret) + self.assertEqual(ret["inf1"], "info1") + self.assertEqual(ret["action"], "genericimportreport") def test_url_constructor(self): connection = ShibaConnection("test", "test") action = "genericimportreport" ret = self.init.inf_constructor(connection, action, inf1="info1", inf2="info2") url = self.init.url_constructor(connection, ret) - self.assertTrue("https://ws.priceminister.com/stock_ws?pwd=test&version=2011-11-29&action=genericimportreport&" - "login=test&inf2=info2&inf1=info1" == url) + self.assertEqual("https://ws.priceminister.com/stock_ws?pwd=test&version=2011-11-29&action=genericimportreport&" + "login=test&inf2=info2&inf1=info1", url) @mock.patch('shiba.shibatools.ShibaTools.post_request', side_effect=return_quota_exceeded_messages) def test_assert_quota_exeeded(self, post_request): @@ -69,4 +71,3 @@ def test_assert_quota_exeeded(self, post_request): f = open(os.path.dirname(os.path.realpath(__file__)) + "/Assets/genericimportfile.xml", "rb") testdict = xmltodict.parse(f) self.assertRaises(ShibaQuotaExceededError, inventory.generic_import_file, data=testdict) - diff --git a/tests/online/test_accountingmanagement.py b/tests/online/test_accountingmanagement.py index 76ce73e..d2bb6ae 100644 --- a/tests/online/test_accountingmanagement.py +++ b/tests/online/test_accountingmanagement.py @@ -8,9 +8,9 @@ from __future__ import unicode_literals -from Shiba.accountingmanagement import AccountingManagement -from Shiba.shibaconnection import ShibaConnection -from Shiba.shibaexceptions import * +from shiba.accountingmanagement import AccountingManagement +from shiba.shibaconnection import ShibaConnection +from shiba.shibaexceptions import * import os import ConfigParser @@ -38,18 +38,18 @@ def setUp(self): def test_get_operations(self): """get_operations routine test, with date object as lastoperationdate too""" obj = self.init.get_operations() - self.assertTrue("getoperationsresult" in obj.content.tag) + self.assertIn("getoperationsresult", obj.content.tag) obj = self.init.get_operations("21/12/2012-00:00:00") - self.assertTrue(obj.content.request.lastoperationdate == "21/12/2012-00:00:00") + self.assertEqual(obj.content.request.lastoperationdate, "21/12/2012-00:00:00") testdate = date(2012, 12, 21) obj = self.init.get_operations(testdate) - self.assertTrue(obj.content.request.lastoperationdate == "21/12/12-00:00:00") + self.assertEqual(obj.content.request.lastoperationdate, "21/12/12-00:00:00") obj = None try: obj = self.init.get_operations("INVALIDDATE") except ShibaParameterError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_get_compensation_details(self): """get_compensation_details test, must fail""" @@ -58,4 +58,4 @@ def test_get_compensation_details(self): obj = self.init.get_compensation_details("1337") except ShibaParameterError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) diff --git a/tests/online/test_inventorymanagement.py b/tests/online/test_inventorymanagement.py index e81a4df..39feb90 100644 --- a/tests/online/test_inventorymanagement.py +++ b/tests/online/test_inventorymanagement.py @@ -8,9 +8,9 @@ from __future__ import unicode_literals -from Shiba.inventorymanagement import InventoryManagement -from Shiba.shibaconnection import ShibaConnection -from Shiba.shibaexceptions import * +from shiba.inventorymanagement import InventoryManagement +from shiba.shibaconnection import ShibaConnection +from shiba.shibaexceptions import * from nose.tools import * import xmltodict @@ -21,6 +21,7 @@ import ConfigParser import os + class InventoryManagementTest(unittest.TestCase): def setUp(self): @@ -40,16 +41,16 @@ def test_product_types(self): """product_types return test""" ptypes = self.init.product_types() - self.assertTrue("producttypesresult" in ptypes.content.tag) + self.assertIn("producttypesresult", ptypes.content.tag) def test_product_type_template(self): """product_type_template tests on two scopes, for a fixed alias, plus a fail result""" alias = "insolites_produit" ptemplate = self.init.product_type_template(alias, "") - self.assertTrue("producttypetemplateresult" in ptemplate.content.tag) + self.assertIn("producttypetemplateresult", ptemplate.content.tag) ptemplate = self.init.product_type_template(alias, "VALUES") - self.assertTrue("producttypetemplateresult" in ptemplate.content.tag) + self.assertIn("producttypetemplateresult", ptemplate.content.tag) @raises(ShibaParameterError) def test_product_type_template_fail(self): @@ -62,11 +63,11 @@ def test_generic_import_file(self): f = open(os.path.dirname(os.path.realpath(__file__)) + "/Assets/genericimportfile.xml", "rb") testdict = xmltodict.parse(f) ret = self.init.generic_import_file(testdict) - self.assertTrue("OK" == ret.content.response.status) + self.assertEqual("OK", ret.content.response.status) f = open(os.path.dirname(os.path.realpath(__file__)) + "/Assets/genericimportfile.xml", "rb") testobj = objectify.parse(f) ret = self.init.generic_import_file(testobj) - self.assertTrue("OK" == ret.content.response.status) + self.assertEqual("OK", ret.content.response.status) def test_generic_import_report(self): """genreic_import_report method test from an import file call""" @@ -75,7 +76,7 @@ def test_generic_import_report(self): ret = self.init.generic_import_file(testobj) importid = ret.content.response.importid ret = self.init.generic_import_report(importid) - self.assertTrue("file" == ret.content.response.file.filename) + self.assertEqual("file", ret.content.response.file.filename) def test_get_available_shipping_types(self): try: @@ -85,4 +86,4 @@ def test_get_available_shipping_types(self): def test_export_inventory(self): obj = self.init.export_inventory() - self.assertTrue("inventoryresult" in obj.content.tag) \ No newline at end of file + self.assertIn("inventoryresult", obj.content.tag) diff --git a/tests/online/test_marketplacemanagement.py b/tests/online/test_marketplacemanagement.py index f2dc687..2dee693 100644 --- a/tests/online/test_marketplacemanagement.py +++ b/tests/online/test_marketplacemanagement.py @@ -8,15 +8,16 @@ from __future__ import unicode_literals -from Shiba.marketplacemanagement import MarketplaceManagement -from Shiba.shibaconnection import ShibaConnection -from Shiba.shibaexceptions import * +from shiba.marketplacemanagement import MarketplaceManagement +from shiba.shibaconnection import ShibaConnection +from shiba.shibaexceptions import * import unittest import ConfigParser import os + class MarketplaceManagementTest(unittest.TestCase): def setUp(self): @@ -39,15 +40,15 @@ def test_get_product_list(self): except ShibaParameterError: pass obj = self.init.get_product_list(kw="livre") - self.assertTrue("listingresult" in obj.content.tag) + self.assertIn("listingresult", obj.content.tag) try: obj = self.init.get_product_list(nbproductsperpage=-15, kw="livre") except ShibaParameterError: pass obj = self.init.get_product_list(kw="informatique", scope="PRICING") - self.assertTrue("listingresult" in obj.content.tag) + self.assertIn("listingresult", obj.content.tag) def test_get_category_map(self): """get_category_map regular test""" obj = self.init.get_category_map() - self.assertTrue("categorymap" in obj.content.tag) \ No newline at end of file + self.assertIn("categorymap", obj.content.tag) diff --git a/tests/online/test_salesmanagement.py b/tests/online/test_salesmanagement.py index f793aaf..c09c46a 100644 --- a/tests/online/test_salesmanagement.py +++ b/tests/online/test_salesmanagement.py @@ -8,15 +8,16 @@ from __future__ import unicode_literals -from Shiba.salesmanagement import SalesManagement -from Shiba.shibaconnection import ShibaConnection -from Shiba.shibaexceptions import * +from shiba.salesmanagement import SalesManagement +from shiba.shibaconnection import ShibaConnection +from shiba.shibaexceptions import * import unittest import ConfigParser import os + class SalesManagementTest(unittest.TestCase): """SalesManagement class unit tests, as it's not possible to emulate a real seller profile, most of those tests are only verifying the proper handling of errors""" @@ -63,11 +64,11 @@ def test_refuse_sale(self): def test_get_current_sales(self): """get_current_sales test, on variable parameters, plus some fail results""" obj = self.init.get_current_sales() - self.assertTrue("getcurrentsalesresult" in obj.content.tag) - self.assertTrue(False == obj.content.request.ispendingpreorder) + self.assertIn("getcurrentsalesresult", obj.content.tag) + self.assertFalse(obj.content.request.ispendingpreorder) obj = self.init.get_current_sales(ispendingpreorder="y") - self.assertTrue("getcurrentsalesresult" in obj.content.tag) - self.assertTrue(True == obj.content.request.ispendingpreorder) + self.assertIn("getcurrentsalesresult", obj.content.tag) + self.assertTrue(obj.content.request.ispendingpreorder) try: self.init.get_current_sales(ispendingpreorder="n") except ShibaCallingError: @@ -75,7 +76,7 @@ def test_get_current_sales(self): obj = self.init.get_current_sales(purchasedate="WRONGDATE") self.assertTrue(elem.content.tag is not "purchasedate" for elem in obj.content.response) obj = self.init.get_current_sales(purchasedate="2012-12-21") - self.assertTrue("21/12/2012" == obj.content.request.purchasedate) + self.assertEqual("21/12/2012", obj.content.request.purchasedate) def test_get_billing_information(self): """get_billing_information test, will raise an error due to unknown purchaseid""" @@ -84,7 +85,7 @@ def test_get_billing_information(self): obj = self.init.get_billing_information("1337") except ShibaServiceError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_get_shipping_information(self): """get_billing_information test, will raise an error due to unknown purchaseid""" @@ -93,12 +94,12 @@ def test_get_shipping_information(self): obj = self.init.get_shipping_information("1337") except ShibaServiceError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_get_items_todo_list(self): """get_items_todo_list routine test""" obj = self.init.get_item_todo_list() - self.assertTrue("getitemtodolistresult" in obj.content.tag) + self.assertIn("getitemtodolistresult", obj.content.tag) def test_get_item_infos(self): """get_item_infos on a unknown product, must fail""" @@ -107,7 +108,7 @@ def test_get_item_infos(self): obj = self.init.get_item_infos("181063") except ShibaServiceError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_cancel_item(self): """cancel_item on an unknown product, must fail""" @@ -116,7 +117,7 @@ def test_cancel_item(self): obj = self.init.cancel_item("1337", "comment") except ShibaServiceError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_contact_us_about_item(self): """contact_us_about_item on an unknown product, must fail""" @@ -125,7 +126,7 @@ def test_contact_us_about_item(self): obj = self.init.contact_us_about_item("1337", "message", "1337") except ShibaServiceError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_contact_user_about_item(self): """contact_user_about_item on an unknown product, must fail""" @@ -134,7 +135,7 @@ def test_contact_user_about_item(self): obj = self.init.contact_user_about_item("1337", "message") except ShibaServiceError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_set_tracking_package_infos(self): """set_tracking_package_infos on an unknown product, must fail. Testing internal error catching as well.""" @@ -143,12 +144,12 @@ def test_set_tracking_package_infos(self): obj = self.init.set_tracking_package_infos("1337", "UPS", "0000000000") except ShibaParameterError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) try: obj = self.init.set_tracking_package_infos("1337", "Autre", "0000000000") except ShibaCallingError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_confirm_preorder(self): """confirm_preorder on an unknown advert, must fail. Testing internal error catching as well.""" @@ -157,12 +158,12 @@ def test_confirm_preorder(self): obj = self.init.confirm_preorder("1337", 1) except ShibaParameterError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) try: obj = self.init.confirm_preorder("1337", -8) except ShibaCallingError: pass - self.assertTrue(obj is None) + self.assertIsNone(obj) def test_wrong_user(self): wronginstance = SalesManagement(ShibaConnection("test", "test")) diff --git a/tests/online/test_shibatools.py b/tests/online/test_shibatools.py index 08c8c6a..03a3f4b 100644 --- a/tests/online/test_shibatools.py +++ b/tests/online/test_shibatools.py @@ -6,15 +6,16 @@ from __future__ import unicode_literals -from Shiba.shibatools import ShibaTools -from Shiba.shibaexceptions import * -from Shiba.shibaconnection import ShibaConnection +from shiba.shibatools import ShibaTools +from shiba.shibaexceptions import * +from shiba.shibaconnection import ShibaConnection import ConfigParser import os import unittest + class ShibaToolsTest(unittest.TestCase): def setUp(self): settings = ConfigParser.ConfigParser() @@ -32,15 +33,21 @@ def setUp(self): def test_retrieve_obj_from_url(self): """retrieve_obj_from_url test with a remote XML file""" obj = self.init.retrieve_obj_from_url("http://www.w3schools.com/xml/note.xml") - self.assertTrue("note" in obj.content.tag) + self.assertIn("note", obj.content.tag) self.assertTrue("to" in obj.content.to.tag and obj.content.to == "Tove") self.assertTrue("heading" in obj.content.heading.tag and obj.content.heading == "Reminder") self.assertTrue("body" in obj.content.body.tag and obj.content.body == "Don't forget me this weekend!") def test_post_request(self): - """testing a post request with retrieve_obj_from_url""" - ret = self.init.post_request("http://postcatcher.in/catchers/54107375e4a183020000118c", "THIS IS SOME CONTENT") - self.assertTrue(ret == "Created" or "Application Error" in ret) + """ + Testing a post request with retrieve_obj_from_url + This test method is dependant of the service used. + (i.e., the content of the assert would change if the test service changes). + http://httpbin.org/post returns the POST data you send. + """ + post_data = "Who do you think you are to give me advice about dating?" + ret = self.init.post_request("http://httpbin.org/post", post_data) + self.assertIn(post_data, ret) def test_create_obj_from_xml(self): """This function is entirely implicitely tested from the InventoryManagementTest.test_generic_import_file""" @@ -50,13 +57,15 @@ def test_inf_constructor(self): connection = ShibaConnection("test", "test") action = "genericimportreport" ret = self.init.inf_constructor(connection, action, inf1="info1", inf2="info2") - self.assertTrue("inf1" in ret and "inf2" in ret) - self.assertTrue(ret["inf1"] == "info1" and ret["action"] == "genericimportreport") + self.assertIn("inf1", ret) + self.assertIn("inf2", ret) + self.assertEqual(ret["inf1"], "info1") + self.assertEqual(ret["action"], "genericimportreport") def test_url_constructor(self): connection = ShibaConnection("test", "test") action = "genericimportreport" ret = self.init.inf_constructor(connection, action, inf1="info1", inf2="info2") url = self.init.url_constructor(connection, ret) - self.assertTrue("https://ws.priceminister.com/stock_ws?pwd=test&version=2011-11-29&action=genericimportreport&" - "login=test&inf2=info2&inf1=info1" == url) \ No newline at end of file + self.assertEqual("https://ws.priceminister.com/stock_ws?pwd=test&version=2011-11-29&action=genericimportreport&" + "login=test&inf2=info2&inf1=info1", url) From 935a156a96fbe0b30d0a07cd2e74c2af6aafc5df Mon Sep 17 00:00:00 2001 From: Phylante Date: Mon, 19 Oct 2015 14:51:01 +0200 Subject: [PATCH 3/3] pep8 + listing service now uses ssl --- README.rst | 4 ++-- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 088166e..04ffccd 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Released: **11-Sep-2014** Last release: **10-Dec-2014** Introduction --------------- +------------ **Shiba** is a Python package that provides interfaces to **PriceMinister Web services**. Currently, all features works with *Python 2.7*. @@ -63,7 +63,7 @@ Please refer to documentation for some information about testing options. Documentation --------------- +------------- Documentation is available on `GitHub pages`_. Extra documentation from the `PriceMinister developper blog`_ might be useful. diff --git a/setup.py b/setup.py index 0c6ca92..53d3b19 100644 --- a/setup.py +++ b/setup.py @@ -7,11 +7,11 @@ setup(name="Shiba", packages=["shiba"], - version="1.1.2", + version="1.1.3", description="A Python API for PriceMinister WebServices", author="Maxime Boguta", author_email="maxime.boguta@epitech.eu", url="https://github.com/ShibaAPI/shiba", - download_url="https://github.com/ShibaAPI/shiba/tarball/1.1.2", + download_url="https://github.com/ShibaAPI/shiba/tarball/1.1.3", keywords=["api", "priceminister", "python", "webservices"], install_requires=["requests", "xmltodict", "lxml", "nose"],)