def test_as_varname(self): token = template.base.Token(2, 'active_users as user_list') node = ActiveUserNode(None, token) self.assertEqual(node.as_varname, 'user_list') token = template.base.Token(2, 'active_users as users') node = ActiveUserNode(None, token) self.assertEqual(node.as_varname, 'users')
def test_render(self): token = template.base.Token(2, 'active_users') node = ActiveUserNode(None, token) self.assertEqual('', node.render({}))
def test_no_args(self): token = template.base.Token(2, 'active_users') ActiveUserNode(None, token)
def test_in_amount_duration_as_varname(self): token = template.base.Token(2, 'active_users in 10 minutes as users') node = ActiveUserNode(None, token) self.assertEqual(node.as_varname, 'users')
def test_render(self): token = template.base.Token(2, "active_users") node = ActiveUserNode(None, token) self.assertEqual('', node.render({}))