<commit_before># -*- coding: utf-8 -*-

import uuid

import requests
from nose.tools import assert_equal

from mfit.resources.tests import Base


class TestUsersCollection(Base):

    def __init__(self):
        self.user = {
            'email_address': '<EMAIL>(uuid.uuid4()),
            'first_name': 'Bruiser',
            'last_name': 'Nguyen'
        }

    @property
    def endpoint_name(self):
        return 'users'

    def test_get_nonexistent_resource(self):
        response = requests.get(url=self.url + 'foo', headers=self.headers)
        assert_equal(response.status_code, 404)

    def test_delete_nonexistent_resource(self):
        self_url = requests.post(url=self.url,
                                 headers=self.headers,
                                 json=self.user).json()['links']['self']
        requests.delete(url=self_url, headers=self.headers, json=self.user)

        response = requests.delete(url=self_url,
                                   headers=self.headers,
                                   json=self.user)

        assert_equal(response.status_code, 404)
<commit_msg>ME-217: Made minor changes<commit_after># -*- coding: utf-8 -*-

import uuid

import requests
from nose.tools import assert_equal

from mfit.resources.tests import Base


class TestUsersCollection(Base):

    def __init__(self):
        self.user = {
            'email_address': '<EMAIL>'.<EMAIL>(uuid.uuid4()),
            'first_name': 'Bruiser',
            'last_name': 'Nguyen'
        }

    @property
    def endpoint_name(self):
        return 'users'

    def test_get_nonexistent_resource(self):
        response = requests.get(url=self.url + 'foo', headers=self.headers)
        assert_equal(response.status_code, 404)

    def test_delete_nonexistent_resource(self):
        response = requests.delete(url=self.url + 'foo', headers=self.headers)
        assert_equal(response.status_code, 404)

{'fraction_non_alphanumeric': 0.11544461778471139, 'fraction_numerical': 0.009880395215808632, 'mean_word_length': 2.405309734513274, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3391579', 'n_tokens_mistral': 586, 'n_tokens_neox': 553, 'n_words': 104}