Ejemplo n.º 1
0
    def test_sync(self):
        with authenticated_user(self.client) as user:
            rv = self.client.get('/default/')
            timestamp = dt_from_timestamp(redis_connection.hget(LAST_ACTIVE_KEY, user.id))
            sync_last_active_at()

            user_reloaded = User.query.filter(User.id==user.id).first()
            self.assertIn('active_at', user_reloaded.details)
            self.assertEqual(user_reloaded.active_at, timestamp)
Ejemplo n.º 2
0
def sync_user_details():
    users.sync_last_active_at()
Ejemplo n.º 3
0
def sync_user_details():
    users.sync_last_active_at()