aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gsxws/products.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/gsxws/products.py b/gsxws/products.py
index dfc4194..98b092b 100644
--- a/gsxws/products.py
+++ b/gsxws/products.py
@@ -7,10 +7,10 @@ import re
import os
import json
-from .utils import fetch_url
-from .lookups import Lookup
-from .diagnostics import Diagnostics
-from .core import GsxObject, GsxError, validate
+from gsxws.utils import fetch_url
+from gsxws.lookups import Lookup
+from gsxws.diagnostics import Diagnostics
+from gsxws.core import GsxObject, GsxError, validate
def models():
@@ -211,7 +211,13 @@ class Product(object):
@property
def is_mac(self):
- return re.match(r'^i?Mac', self.description)
+ """
+ >>> product = Product('DGKFL06JDHJP')
+ >>> product.description = "MacBook Pro"
+ >>> product.is_mac
+ True
+ """
+ return (re.match(r'^i?Mac', self.description) != None)
@property
def is_iphone(self):
@@ -263,7 +269,7 @@ if __name__ == '__main__':
import sys
import doctest
import logging
- from .core import connect
+ from gsxws.core import connect
logging.basicConfig(level=logging.DEBUG)
connect(*sys.argv[1:])
doctest.testmod()