Example #1
0
    def test_upadte(self):
        label = dict(name='80后',category=1)
        val = m_exists(TName,**label)
        if val:
            print m_del(TName,val['_id'])

        print add(1,'80后')
        print add(1,'80后')
        print add(1,'80后')
        
        print add(1,'90后')
        print add(1,'90后')

        val = m_exists(TName,**label)
        print val
        assert val['usage'] ==3

        print 'suggest:',suggest(1)
Example #2
0
    def test_update(self):
        label = dict(name='80后',category=1)
        val = m_exists(TName,**label)
        if val:
            print m_del(TName,val['_id'])

        print add(1,'80后')
        print add(1,'80后')
        print add(1,'80后')
        
        print add(1,'90后')
        print add(1,'90后')

        val = m_exists(TName,**label)
        print val
        assert val['usage'] ==3

        print 'suggest:',suggest(1)
Example #3
0
 def post(self):
     _id = self.get_argument("id", None)
     r, v = m_del(TNews, _id)
     self.write(dict(status=r, data=v))
Example #4
0
 def tearDownClass(cls):
     if cls.entity_id:
         m_del('city',cls.entity_id,is_del=True)
Example #5
0
 def post(self):
     _id = self.get_argument("id", None)
     r,v = m_del(T_CATEGORY,_id)
     self.write(dict(status = r,data = v))
Example #6
0
 def get(self,table):
     r,v= m_del(table,self.get_argument('id'))
     self.write(dict(status = r, data = v))
Example #7
0
 def get(self, table):
     r, v = m_del(table, self.get_argument('id'))
     self.write(dict(status=r, data=v))
Example #8
0
 def post(self):
     _id = self.get_argument("id", None)
     r,v = m_del(T_Servercity,_id)
     self.write(dict(status = r,data = v))