Exemple #1
0
 def on_message(self, msg):
     try:
         if msg['text'][0] == "/":
             taxa = msg['text'][1:].lower()
             Fabrica.destroy()
             fabrica = Fabrica(taxa=taxa)
             self.sender.sendMessage(fabrica.get())
     except Exception as e:
         logr.error(e, exc_info=True)
Exemple #2
0
 def on_message(self, msg):
     try:
         if msg['text'][0] == "/":
             taxa = msg['text'][1:].lower()
             Fabrica.destroy()
             fabrica = Fabrica(taxa=taxa)
             self.sender.sendMessage(fabrica.get())
     except Exception as e:
         logr.error(e, exc_info=True)
Exemple #3
0
def test_carrega_dolar():
    Fabrica.destroy()
    fabrica = Fabrica(taxa="dolar")
    assert isinstance(fabrica, Dolar)
Exemple #4
0
def test_erro_taxa_merda():
    Fabrica.destroy()
    with pytest.raises(Exception):
        (Fabrica(taxa="merda"))
Exemple #5
0
def test_carrega_dolar():
    Fabrica.destroy()
    fabrica = Fabrica(taxa="dolar")
    assert isinstance(fabrica, Dolar)
Exemple #6
0
def test_erro_taxa_merda():
    Fabrica.destroy()
    with pytest.raises(Exception):
        (Fabrica(taxa="merda"))