import uuid
from unittest import TestCase

from pyresponse import PureResponseClient as PureResponseClient

ListName = lambda: str(uuid.uuid4())


class BasicTests(TestCase):
    
    def setUp(self):
        self.client = PureResponseClient()
        self.client.authenticate('tm.system', 'crwkbplf')

    def test_create_list(self):
        self.client.create_list(ListName(), 
            {'email': 'blackhole@example.com', 'name': 'John Doe'})

    def test_create_list_multiple(self):
        self.client.create_list(ListName(), 
            [{'email': 'mars@example.com', 'name': 'John Doe'}, {'email': 'venus@example.com', 'name': 'Jane Doe'}])

@@ -101,20 +101,58 @@
 Client%0A%0A
-List
+# Generate a random string to name things%0A
 Name = l
@@ -390,36 +390,32 @@
 ent.create_list(
-List
 Name(), %0A       
@@ -553,34 +553,561 @@
 ist(
-ListName(), %0A            %5B
+Name(), %5B%7B%0A            'email': 'mars@example.com', 'name': 'John Doe'%7D,%0A            %7B'email': 'venus@example.com', 'name': 'Jane Doe'%7D%0A        %5D)%0A            %0A    def test_add_person_to_list(self):%0A        list_name = Name()%0A        self.client.create_list(list_name, %5B%5D)%0A        self.client.add_person(list_name,%0A            %7B'email': 'blackhole@example.com', 'name': 'John Doe'%7D)%0A%0A    def test_add_people_to_list(self):%0A        list_name = Name()%0A        self.client.create_list(list_name, %5B%5D)%0A        self.client.add_people(list_name, %5B%0A            
 %7B'em
@@ -1153,16 +1153,29 @@
  Doe'%7D, 
+%0A            
 %7B'email'
@@ -1216,11 +1216,1237 @@
 ne Doe'%7D
-%5D
+%0A        %5D)%0A%0A    def test_create_message(self):%0A        self.client.create_message(%0A            Name(),%0A            'subject line',%0A            '%3Ch1%3EHeadline%3C/h1%3E%3Cp%3Ebody of text%3C/p%3E'%0A        )%0A%0A    def test_single_message(self):%0A        message_name = Name()%0A        self.client.create_message(%0A            message_name,%0A            'subject line',%0A            '%3Ch1%3EHeadline%3C/h1%3E%3Cp%3Ebody of text%3C/p%3E'%0A        )%0A        self.client.send_to_person(%0A            message_name, 'recipient@example.com')%0A%0A    def test_send_campaign_message(self):%0A        message_name = Name()%0A        list_name = Name()%0A        self.client.create_message(%0A            message_name,%0A            'subject line',%0A            '%3Ch1%3EHeadline%3C/h1%3E%3Cp%3Ebody of text%3C/p%3E'%0A        )%0A        self.client.create_list(list_name, %5B%7B%0A            'email': 'mars@example.com', 'name': 'John Doe'%7D,%0A            %7B'email': 'venus@example.com', 'name': 'Jane Doe'%7D%0A        %5D)%0A        self.client.send_to_list(message_name, list_name)%0A%0A    def test_get_person(self):%0A        self.client.person_by_email('blackhole@example.com')%0A%0A    def test_get_list(self):%0A        list_name = Name()%0A        self.client.create_list(list_name, %5B%5D)%0A        self.client.list_by_name(list_name
 )%0A

add more tests from documentation examples