Subversion Repositories SmartDukaan

Rev

Rev 2065 | Rev 2222 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2065 Rev 2207
Line 1... Line 1...
1
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, status, Warehouse,\
1
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, status, Warehouse,\
2
    VendorItemPricing
2
    VendorItemPricing
3
import datetime
3
import datetime
4
from shop2020.clients.InventoryClient import InventoryClient
4
from shop2020.clients.InventoryClient import InventoryClient
5
from shop2020.utils.Utils import to_java_date
5
from shop2020.utils.Utils import to_java_date
6
from shop2020.model.v1.catalog.impl.DataAcessors import validate_prices
6
from shop2020.model.v1.catalog.impl.DataAcessors import validate_item_prices, validate_vendor_prices
-
 
7
 
7
 
8
 
8
"""
-
 
9
inventory_client = InventoryClient()
9
inventory_client = InventoryClient()
10
 
10
 
11
inventory_client.__start__()
11
inventory_client.__start__()
12
 
12
 
13
client = inventory_client.get_client()
13
client = inventory_client.get_client()
-
 
14
"""
14
#deals = client.getBestDeals()
15
#deals = client.getBestDeals()
15
#print deals
16
#print deals
16
 
17
 
17
warehouse_id, items_in_inventory = client.getItemAvailabilityAtLocation(0, 132)
18
warehouse_id, items_in_inventory = client.getItemAvailabilityAtLocation(0, 132)
18
print warehouse_id
19
print warehouse_id
Line 70... Line 71...
70
        print ex
71
        print ex
71
        return
72
        return
72
    print 'prices validated'
73
    print 'prices validated'
73
    return
74
    return
74
 
75
 
-
 
76
def check_similar_item():
-
 
77
    print (client.checkSimilarItem('handset', 'spice', 'bldk', None))
-
 
78
    print (client.checkSimilarItem('handset', 'spice', 'bldk', ''))
-
 
79
    print (client.checkSimilarItem('handset', 'spice', 'bldk', 'Black'))
-
 
80
 
75
if __name__ == '__main__':
81
if __name__ == '__main__':
76
    test_validate()
82
    #test_validate()
-
 
83
    check_similar_item()