Subversion Repositories SmartDukaan

Rev

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

Rev 130 Rev 404
Line 1... Line 1...
1
'''
1
'''
2
Created on 03-May-2010
2
Created on 03-May-2010
3
 
3
 
4
@author: ashish
4
@author: ashish
5
'''
5
'''
6
from shop2020.model.v1.user.impl.Dataservice import *
-
 
7
 
6
 
8
init = initialize
7
from shop2020.clients.UserClient import UserClient
-
 
8
from shop2020.thriftpy.model.v1.user.ttypes import *  
-
 
9
from shop2020.thriftpy.model.v1.user.UserContextService import addAddressForUser_result
9
 
10
 
10
init()
-
 
11
 
11
 
12
user = User()
12
user_client = UserClient()
13
primary_info = PrimaryInfo()
-
 
14
intenralInfo = InternalInfo()
-
 
15
state = State()
-
 
16
 
13
 
-
 
14
user_client.__start__()
-
 
15
 
-
 
16
client = user_client.get_client()
-
 
17
 
-
 
18
 
-
 
19
 
-
 
20
user_context = UserContext()
-
 
21
 
-
 
22
primary_info = UserPrimaryInfo()
-
 
23
 
-
 
24
internal_info = UserInternalInfo()
-
 
25
state = UserState()
-
 
26
 
-
 
27
 
-
 
28
 
-
 
29
primary_info.email = "test@shop2020.in"
-
 
30
primary_info.firstName = "Rajveer"
-
 
31
primary_info.lastName = "Singh"
-
 
32
primary_info.occupation = "Doctor"
-
 
33
 
-
 
34
 
-
 
35
address1 = Address()
-
 
36
address1.city = "Sikar"
-
 
37
address1.country = "India"
-
 
38
address1.pin = "332301"
-
 
39
address1.line1 = "Line 1 house 1"
-
 
40
address1.line2 = "Line 2 House 2"
-
 
41
address1.enabled = True
-
 
42
 
-
 
43
#addresses = []
-
 
44
#addresses.append(address1)
-
 
45
#primary_info.addresses = addresses
-
 
46
 
-
 
47
user_context.primaryInfo = primary_info
-
 
48
user_context.internalInfo = internal_info
-
 
49
 
-
 
50
 
-
 
51
user_context.userState = state
-
 
52
 
-
 
53
client.createContext(user_context,False)
-
 
54
 
-
 
55
 
-
 
56
 
-
 
57
client.addAddressForUser(address1, 5,None)