Test API Rejestru użytkownika

    def test_api_register_user(self):
        response = self.client.post('/api/users', json={
            'username': 'bob',
            'email': '[email protected]',
            'password': 'bar'
        })
        assert response.status_code == 201

        # make sure the user is in the database
        user = User.query.filter_by(username='bob').first()
        assert user is not None
        assert user.email == '[email protected]'
Puzzled Puffin