import re
from app import create_app
app = create_app()
c = app.test_client()
c.post('/auth/login', data={'email':'admin@vapolyx.gg','password':'Admin@123'}, follow_redirects=False)
r = c.get('/home')
html = r.data.decode('utf-8','replace')
print('home status:', r.status_code)
print('DEBUG present:', 'header_teams=' in html)
print('team-drop-item count:', html.count('team-drop-item'))
items = re.findall(r"class='team-drop-item'[^>]*>(.*?)</a>", html, re.S)
print('items found:', len(items))
for x in items:
    print('ITEM:', x[:80])
