Example #1
0
    def test_get_by_uid(self):
        p = {'url': 'http://10101010101'}

        self.add_message(**p)
        a = MLog.get_by_uid(self.uid)
        assert a.current_url == p['url']
        self.tearDown()
Example #2
0
    def test_add(self):
        a = MLog.get_by_uid(self.uid)

        assert a == None
        post_data = {
            'uid': self.uid,
            'url': 'http://54243243',
            'refer': 'http://344343',
            'user_id': self.userid,
            'timein': '1545104860000',
            'timeOut': '1545104861000',
            'timeon': '1',
        }

        a = MLog.add(post_data)
        assert a
        self.tearDown()
Example #3
0
 def tearDown(self):
     print("function teardown")
     tt = MLog.get_by_uid(self.uid)
     if tt:
         MHelper.delete(TabLog, self.uid)
Example #4
0
 def test_get_by_uid(self):
     MLog.get_by_uid(self.uid)
     assert True