"""
Integration tests for other endpoints (banners, pages, etc.).
"""
import pytest


@pytest.mark.integration
class TestOtherEndpoints:
    """Test other API endpoints."""
    
    def test_get_banners(self, client):
        """Test getting banners."""
        response = client.get("/api/banners/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404]
    
    def test_get_home_content(self, client):
        """Test getting home page content."""
        response = client.get("/api/home/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404]
    
    def test_get_about_content(self, client):
        """Test getting about page content."""
        response = client.get("/api/about/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404]
    
    def test_get_contact_info(self, client):
        """Test getting contact information."""
        response = client.get("/api/contact/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404]
    
    def test_submit_contact_form(self, client):
        """Test submitting contact form."""
        response = client.post(
            "/api/contact/",
            json={
                "name": "Test User",
                "email": "test@example.com",
                "message": "Test message"
            }
        )
        # May return 200, 201, 403 (CSRF), or 404 if endpoint doesn't exist
        assert response.status_code in [200, 201, 403, 404]
    
    def test_get_privacy_policy(self, client):
        """Test getting privacy policy."""
        response = client.get("/api/privacy/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404]
    
    def test_get_terms(self, client):
        """Test getting terms and conditions."""
        response = client.get("/api/terms/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404]
    
    def test_get_faq(self, client):
        """Test getting FAQ."""
        response = client.get("/api/faq/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404]
    
    def test_get_system_settings_admin(self, admin_client):
        """Test getting system settings as admin."""
        response = admin_client.get("/api/system-settings/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404, 401]
    
    def test_get_analytics_admin(self, admin_client):
        """Test getting analytics as admin."""
        response = admin_client.get("/api/analytics/")
        # May return 200 or 404 if endpoint doesn't exist
        assert response.status_code in [200, 404, 401]

