예제 #1
0
	def test_create_success(self):
		create_payload = {
			"logins": [
				{
				"email": "*****@*****.**",
				"password": "******",
				"read_only":False
				}
			],
			"phone_numbers": [
				"901.111.1111"
			],
			"legal_names": [
				"PYTHON TEST USER"
			],
			"extra": {
				"note": "Interesting user",
				"supp_id": "122eddfgbeafrfvbbb",
				"is_business": False
			}
		}
		user = Users.create(
			payload=create_payload,
			fingerprint=FINGERPRINT,
			client=self.client,
			ip_address=IP_ADDRESS
		)
		self.assertTrue(user.json != None)
		self.assertTrue(user.oauth_key != None)
예제 #2
0
	def create_user(self):
		"""Summary
		
		Returns:
		    TYPE: Description
		"""
		create_payload = {
			"logins": [
				{
				"email": "*****@*****.**",
				"password": "******",
				"read_only":False
				}
			],
			"phone_numbers": [
				"901.111.1111"
			],
			"legal_names": [
				"PYTHON TEST USER"
			],
			"extra": {
				"note": "Interesting user",
				"supp_id": "122eddfgbeafrfvbbb",
				"is_business": False
			}
		}
		return Users.create(
			client=self.client,
			payload=create_payload,
			fingerprint=FINGERPRINT,
			ip_address=IP_ADDRESS
		)
	def setUp(self):
		client = Clients(
			client_id=CLIENT_ID,
			client_secret=CLIENT_SECRET,
			is_production=False
		)
		create_payload = {
			"logins": [
				{
					"email": "*****@*****.**",
					"password": "******",
					"read_only":False
				}
			],
			"phone_numbers": [
				"901.111.1111"
			],
			"legal_names": [
				"PYTHON TEST USER"
			],
			"extra": {
				"note": "Interesting user",
				"supp_id": "122eddfgbeafrfvbbb",
				"is_business": False
			}
		}
		self.user = Users.create(
			payload=create_payload,
			client=client,
			fingerprint=FINGERPRINT,
			ip_address=IP_ADDRESS
		)
		self.node_id = Nodes.get(user=self.user, client=client)['nodes'][0]['_id']
 def test_get_error(self):
     user = Users.get(client=self.client,
                      _id=VERIFIED_USER_ID,
                      fingerprint=FINGERPRINT)
     self.assertTrue(user.json != None)
     self.assertTrue(user.oauth_key != None)
     self.assertTrue(user.ip_address == None)
예제 #5
0
	def test_create_error(self):
		create_payload = {
			"logins": [
				{
				"password": "******",
				"read_only":False
				}
			],
			"phone_numbers": [
				"901.111.1111"
			],
			"legal_names": [
				"PYTHON TEST USER"
			],
			"extra": {
				"note": "Interesting user",
				"supp_id": "122eddfgbeafrfvbbb",
				"is_business": False
			}
		}
		try:
			user = Users.create(
				payload=create_payload,
				fingerprint=FINGERPRINT,
				client=self.client
			)
			self.assertTrue(user.json == None)
			self.assertTrue(user.oauth_key == None)
		except APIError as error:
			self.assertTrue(error != None)
 def test_get_success(self):
     user = Users.get(client=self.client,
                      _id=USER_ID,
                      fingerprint=FINGERPRINT,
                      ip_address=IP_ADDRESS)
     self.assertTrue(user.json != None)
     self.assertTrue(user.oauth_key != None)
     self.assertTrue(user.ip_address == IP_ADDRESS)
예제 #7
0
	def test_get_error(self):
		user = Users.get(
			client=self.client,
			_id=VERIFIED_USER_ID,
			fingerprint=FINGERPRINT
		)
		self.assertTrue(user.json != None)
		self.assertTrue(user.oauth_key != None)
		self.assertTrue(user.ip_address == None)
 def setUp(self):
     client = Clients(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET,
                      is_production=False)
     user = Users.get(_id=VERIFIED_USER_ID,
                      client=client,
                      fingerprint=FINGERPRINT,
                      ip_address=IP_ADDRESS)
     nodes = Nodes.get(user=user, client=client)
     self.node = Node(json=nodes['nodes'][0], user=user)
	def setUp(self):
		client = Clients(
			client_id=CLIENT_ID,
			client_secret=CLIENT_SECRET,
			is_production=False
		)
		user = Users.get(
			_id=VERIFIED_USER_ID,
			client=client,
			fingerprint=FINGERPRINT,
			ip_address=IP_ADDRESS
		)
		nodes = Nodes.get(user=user, client=client)
		self.node = Node(json=nodes['nodes'][0], user=user)
 def test_create_success(self):
     create_payload = {
         "logins": [{
             "email": "*****@*****.**",
             "password": "******",
             "read_only": False
         }],
         "phone_numbers": ["901.111.1111"],
         "legal_names": ["PYTHON TEST USER"],
         "extra": {
             "note": "Interesting user",
             "supp_id": "122eddfgbeafrfvbbb",
             "is_business": False
         }
     }
     user = Users.create(payload=create_payload,
                         fingerprint=FINGERPRINT,
                         client=self.client,
                         ip_address=IP_ADDRESS)
     self.assertTrue(user.json != None)
     self.assertTrue(user.oauth_key != None)
 def test_create_error(self):
     create_payload = {
         "logins": [{
             "password": "******",
             "read_only": False
         }],
         "phone_numbers": ["901.111.1111"],
         "legal_names": ["PYTHON TEST USER"],
         "extra": {
             "note": "Interesting user",
             "supp_id": "122eddfgbeafrfvbbb",
             "is_business": False
         }
     }
     try:
         user = Users.create(payload=create_payload,
                             fingerprint=FINGERPRINT,
                             client=self.client)
         self.assertTrue(user.json == None)
         self.assertTrue(user.oauth_key == None)
     except APIError as error:
         self.assertTrue(error != None)
예제 #12
0
	def setUp(self):
		client = Clients(
			fingerprint=FINGERPRINT,
			client_id=CLIENT_ID,
			client_secret=CLIENT_SECRET,
			is_production=False
		)

		create_payload = {
			"logins": [
				{
					"email": "*****@*****.**",
					"password": "******",
					"read_only":False
				}
			],
			"phone_numbers": [
				"901.111.1111"
			],
			"legal_names": [
				"PYTHON TEST USER"
			],
			"extra": {
				"note": "Interesting user",
				"supp_id": "122eddfgbeafrfvbbb",
				"is_business": False
			}
		}

		self.user = Users.create(
			payload=create_payload,
			fingerprint=FINGERPRINT,
			client=client,
			ip_address=IP_ADDRESS
		)
		self.node = Nodes.get(user=self.user, client=client)
    def create_user(self):
        """Summary
		
		Returns:
		    TYPE: Description
		"""
        create_payload = {
            "logins": [{
                "email": "*****@*****.**",
                "password": "******",
                "read_only": False
            }],
            "phone_numbers": ["901.111.1111"],
            "legal_names": ["PYTHON TEST USER"],
            "extra": {
                "note": "Interesting user",
                "supp_id": "122eddfgbeafrfvbbb",
                "is_business": False
            }
        }
        return Users.create(client=self.client,
                            payload=create_payload,
                            fingerprint=FINGERPRINT,
                            ip_address=IP_ADDRESS)
예제 #14
0
	def test_get_success(self):
		user = Users.get(client=self.client, _id=USER_ID, fingerprint=FINGERPRINT, ip_address=IP_ADDRESS)
		self.assertTrue(user.json != None)
		self.assertTrue(user.oauth_key != None)
		self.assertTrue(user.ip_address == IP_ADDRESS)
예제 #15
0
	def test_multi_get_error(self):
		try:
			users = Users.get(client=None)
			self.assertTrue(False)
		except Exception as error:
			self.assertTrue(error != None)
예제 #16
0
	def test_multi_get_success(self):
		users = Users.get(client=self.client)
		self.assertTrue(len(users) > 0)
 def test_multi_get_error(self):
     try:
         users = Users.get(client=None)
         self.assertTrue(False)
     except Exception as error:
         self.assertTrue(error != None)
 def test_multi_get_success(self):
     users = Users.get(client=self.client)
     self.assertTrue(len(users) > 0)