Subversion Repositories SmartDukaan

Rev

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

Rev 23680 Rev 23681
Line 1... Line 1...
1
'''
1
'''
2
Created on 22/05/2018
2
Created on 25-Mar-2010
3
 
3
 
4
@author: Govind
4
@author: ashish
5
'''
5
'''
6
 
-
 
-
 
6
from shop2020.thriftpy.config.ttypes import ConfigException
-
 
7
from thrift.transport import TSocket
-
 
8
from thrift.transport.TTransport import TFramedTransport
-
 
9
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
-
 
10
from shop2020.thriftpy.config import Configuration
7
from shop2020.config.client.ConfigClient import ConfigClient
11
from shop2020.config.client.ConfigClient import ConfigClient
8
from shop2020.thriftpy.utils.ttypes import *
-
 
9
 
-
 
10
config_client=ConfigClient()
-
 
11
client=config_client.get_property("live")
-
 
12
 
-
 
13
"""
-
 
14
mail = Mail()
-
 
15
mail.to = ["rajveer.singh@shop2020.in","rajveer.singh@shop2020.in"]
-
 
16
mail.subject = "Test mail subject"
-
 
17
mail.data = "Mail text"
-
 
18
mail.password = "dummy"
-
 
19
mail.sender="rajveer.singh@shop2020.in"
-
 
20
client.sendMail(mail)
-
 
21
"""
-
 
22
 
12
 
23
#def test_get_reports():
-
 
24
#    reports = client.getReports(2)
-
 
25
#   for r in reports:
13
        
26
 #       print r.description
-
 
27
    
14
    
28
#def test_email_archival():
-
 
29
 #   client.markEmailAsSent(29)
-
 
30
    
-
 
31
#def testAlive():
-
 
32
 #   return client.isAlive()
-
 
33
 
-
 
34
#test_get_reports()
-
 
35
#test_email_archival()
-
 
36
 
-
 
37
if __name__ == '__main__':
15
if __name__ == '__main__':
-
 
16
    #test config client 
-
 
17
    try:
-
 
18
        config_client = ConfigClient()
-
 
19
        config_client.set_property('export_entities_path', 'true')
38
    print config_client.get_property("live")
20
        print config_client.get_property("export_entities_path")
-
 
21
 
-
 
22
    except:
-
 
23
        print "error while putting up config client"
39
24