Exemple #1
0
    def test_get_protocol_all(self):
        protocol = Protocol(name='MQTT', created_date=datetime.datetime.now())
        protocol.save()

        results = protocol_query.get_all()

        for result in results:
            print(result.name)
Exemple #2
0
    def test_update_protocol_(self):
        protocol = Protocol(name='MQTT', created_date=datetime.datetime.now())
        protocol.save()

        result = protocol_query.get_by_name('MQTT')

        print(result.name)
        result.name = 'MQTT2'
        result.save()
        
        results_update = protocol_query.get_all()

        for result in results_update:
            print(result.name)
Exemple #3
0
 def test_save_protocol_object(self):
     protocol = Protocol(name='MQTT',created_date=datetime.datetime.now())
     protocol.save()