Exemple #1
0
 def test_last2(self):
     o = Object()
     o.save()
     uuid1 = o.__stp__.split(os.sep)[1]
     last(o)
     uuid2 = o.__stp__.split(os.sep)[1]
     self.assertEqual(uuid1, uuid2)
Exemple #2
0
 def test_last(self):
     o = Object()
     o.bla = "test"
     o.save()
     oo = Object()
     last(oo)
     self.assertEqual(oo.bla, "test")
Exemple #3
0
def cfg(event):
    c = Cfg()
    last(c)
    if not event.sets:
        return event.reply(fmt(c, skip=["username", "realname"]))
    edit(c, event.sets)
    c.save()
    event.reply("ok")
Exemple #4
0
 def start(self):
     last(self.cfg)
     if self.cfg.channel not in self.channels:
         self.channels.append(self.cfg.channel)
     self.stopped.clear()
     self.connected.clear()
     self.joined.clear()
     self.sock = None
     self.doconnect(self.cfg.server, self.cfg.nick, int(self.cfg.port))
     self.connected.wait()
     Handler.start(self)
     Output.start(self)
     Bus.add(self)
     if not self.keeprunning:
         launch(self.keep)
     self.wait()
Exemple #5
0
 def start(self):
     last(self.cfg)
     launch(self.server)
Exemple #6
0
 def start(self, repeat=True):
     last(Fetcher.cfg)
     last(Fetcher.seen)
     if repeat:
         repeater = Repeater(300.0, self.run)
         repeater.start()
Exemple #7
0
 def test_final(self):
     o = Object()
     o.last = "bla"
     last(o)
     self.assertEqual(o.last, "bla")