<commit_before>package de.fu_berlin.cdv.chasingpictures.api;

import android.test.AndroidTestCase;

import junit.framework.TestCase;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * @author Simon
 */
public class PictureRequestTest extends AndroidTestCase {
    @Override
    public void setUp() throws Exception {
        super.setUp();


    }

    public void testPictureRequest() throws Exception {
        Place p = new Place();
        p.setId(6);

        // Register user so we have a valid access token
        LoginRequestTest.registerUser(
                getContext(),
                "Tom",
                LoginRequestTest.getUniqueEmail(),
                "12345678"
        );

        PictureRequest request = new PictureRequest(getContext(), p);

        ResponseEntity<PictureApiResult> responseEntity = request.sendRequest();
        assertEquals("HTTP Status not OK", responseEntity.getStatusCode(), HttpStatus.OK);
        PictureApiResult body = responseEntity.getBody();
        assertNotNull("API response contains no data.", body);
        List<Picture> pictures = body.getData();
        assertFalse("Picture list is empty", pictures == null || pictures.size() == 0);

        // TODO: More testing
    }
}<commit_msg>Update test method for picture request<commit_after>package de.fu_berlin.cdv.chasingpictures.api;

import android.test.AndroidTestCase;

import junit.framework.TestCase;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * @author Simon
 */
public class PictureRequestTest extends AndroidTestCase {
    @Override
    public void setUp() throws Exception {
        super.setUp();


    }

    public void testPictureRequest() throws Exception {
        Place p = new Place();
        p.setId(6);

        // Register user so we have a valid access token
        LoginRequestTest.registerUser(
                getContext(),
                "Tom",
                LoginRequestTest.getUniqueEmail(),
                "12345678"
        );

        PictureRequest request = new PictureRequest(getContext(), p);

        ResponseEntity<PictureApiResult> responseEntity = request.sendRequest();
        assertEquals("HTTP Status not OK", responseEntity.getStatusCode(), HttpStatus.OK);
        PictureApiResult body = responseEntity.getBody();
        assertNotNull("API response contains no data.", body);
        List<Picture> pictures = body.getData();
        assertFalse("Picture list is empty", pictures == null || pictures.isEmpty());

        // TODO: More testing
    }
}
{'fraction_non_alphanumeric': 0.10056285178236397, 'fraction_numerical': 0.007129455909943715, 'mean_word_length': 2.797720797720798, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '145851', 'n_tokens_mistral': 692, 'n_tokens_neox': 651, 'n_words': 178}