def test_account_by_email(self):
        email = '*****@*****.**'     
        acc = Account(email=email, username='******')
        acc.save()

        out = Account.get_by_email('madeupemail')
        assert len(out) == 0, out

        out = Account.get_by_email(email)
        assert len(out) == 1, out
        assert out[0].email == email
        assert out[0].username == 'abc'
 def test_key(self):
     c = Account(id='foo')
     c.save()
     c = Account.get('foo')
     assert c.id == 'foo', 'Account key not set by constructor'
     assert len(c.secret) == 36, c