예제 #1
0
    def test_put(self):
        check = yield admin_l10n.get(u'en')
        self.assertEqual(empty_texts, check)

        handler = self.request(custom_texts, role='admin')

        yield handler.put(lang=u'en')

        check = yield admin_l10n.get(u'en')
        self.assertEqual(custom_texts, check)
예제 #2
0
    def test_delete(self):
        yield self.test_put()

        check = yield admin_l10n.get(1, 'en')
        self.assertEqual(custom_texts1, check)

        handler = self.request({}, role='admin')
        handler.delete(lang=u'en')

        check = yield admin_l10n.get(1, 'en')
        self.assertEqual(empty_texts, check)