Exemplo n.º 1
0
 def btest_delete_deg(self):
     sender = Sender()
     response = sender.send_deg(self.get_random_degree())
     self.assertEqual(201, response.status_code)
     rjson = response.json()
     id = rjson['id']
     status_code = sender.del_deg(id)
     self.assertEqual(200, status_code)
Exemplo n.º 2
0
    def btest_sender_deg(self):
        logging.info('testing deg send...')
        sender = Sender()
        for i in range(0, 2):
            if i % 2:
                pass
            else:
                sender.user_box = self.user_box
                sender.user_box_passwd = self.user_box_passwd

            response = sender.send_deg(self.get_random_degree())
            self.assertEqual(201, response.status_code)
        logging.info('DONE')
Exemplo n.º 3
0
 def send_temperature(self):
     logging.debug('GetSendTemp: send_temperature')
     sender = Sender()
     sender.send_deg(self.temperature)
Exemplo n.º 4
0
 def btest_sender_deg_toolow(self):
     sender = Sender()
     response = sender.send_deg(-23.000)
     self.assertEqual(400, response.status_code)