import json
from tests.helpers import FlaskTestCase, fixtures


class TestUserAPI(FlaskTestCase):

    @fixtures('base.json')
    def test_get_empty_users(self):
        """Test GET /api/users endpoint with no data"""
        response = self.test_client.get('/api/users')
        assert response.status_code is 200

    def test_get_one_user(self):
        """Test GET /api/users endpoint with a single user"""

    def test_get_multiple_users(self):
        """Test GET /api/users endpoint with multple users"""

    def test_get_no_user_by_id(self):
        """Test GET /api/users/(int:id) for missing user"""

    def test_user_by_id(self):
        """Test GET /api/users(int:id) for existing user"""

    @fixtures('base.json')
    def test_post_user(self):
        data = {
            'name': 'Giancarlo Anemone',
            'username': 'ganemone',
            'email': 'ganemone@gmail.com',
            'password': 'password',
            'confirm': 'password'
        }
        response = self.app.post(
            '/api/users',
            data=json.dumps(data)
        )

        assert response.status_code is 201

@@ -227,24 +227,30 @@
 response
+, data
  = self.
 test_cli
@@ -245,37 +245,80 @@
 elf.
-test_client.get('/api/users')
+api_request('get', '/api/users')%0A        assert data%5B'num_results'%5D is 0
 %0A   
@@ -358,16 +358,50 @@
 is 200%0A%0A
+    @fixtures('single_user.json')%0A
     def 
@@ -479,32 +479,211 @@
  single user%22%22%22%0A
+        response, data = self.api_request('get', '/api/users')%0A        assert data%5B'num_results'%5D is 1%0A        assert response.status_code is 200%0A%0A    @fixtures('many_users.json')
 %0A    def test_ge
@@ -765,24 +765,57 @@
 e users%22%22%22%0A%0A
+    @fixtures('many_users.json')%0A
     def test
@@ -897,24 +897,57 @@
 ng user%22%22%22%0A%0A
+    @fixtures('many_users.json')%0A
     def test

Implement tests for getting empty users list and single user list