Question: Hi there I am writing scraping code but when i try to get all paragraph from website it give me following error
Unicode Encode Error: Charmap cannot encode character '\xa9'

here is my code:

```js
#Loading Libraries
import urllib
from urllib.parse import urlparse
from urllib.parse import urljoin
import urllib.request
from bs4 import BeautifulSoup

#define URL for scraping
newsurl = "http://www.techspot.com/news/67832-netflix-exceeds-growth-expectations-home-abroad-stock-soars.html"
thepage = urllib.request.urlopen(newsurl)

soup = BeautifulSoup(thepage ,"html.parser")

article = soup.find_all('div' , {'class','articleBody'})

for pg in article:
 paragraph = soup.findAll('p')
 ptag = paragraph
 print(ptag)
```

Error I am getting is following:

[![enter image description here](https://i.stack.imgur.com/7oENQ.jpg)](https://i.stack.imgur.com/7oENQ.jpg)

Let me how to remove this error

Answer: 
You should verify the 2 statements because your code can change.

Unit test is some kind of documentation of your code.

* Verifying both statements means that both statements MUST not be called.
* Verifying only one means that only the 1st statement MUST not be called.

If someone changes the method to call `anotherService.someMethod()` inside the `if` statement, your test will still pass with 1 verify and will fail with 2 verify.
You are right to worry that your test should only be testing one "concept" at a time, and that it is a matter of judgment about what constitutes a test that does "too much". Your original example is a good one:

```
@Test
public void testDoSomethingWithSmallSize() throws Exception{
   testObj.doSomething(5);
   verify(someServiceMock, never()).someMethod();
   verify(anotherServiceMock, never()).someMethod();
   // GOOD: You've called one method-under-test and
   // verified two related postconditions. A perfect, small, clear test.
}

```

But it's easy to take this too far.

```
@Test
public void testDoSomethingWithAnySmallSize() throws Exception{
   testObj.doSomething(1);
   testObj.doSomething(3);
   testObj.doSomething(5);
   verify(someServiceMock, never()).someMethod();
   verify(anotherServiceMock, never()).someMethod();
   // LESS GOOD: You've called one method-under-test three times, but
   // they share postconditions and concepts. Pragmatic, but not the
   // "one test method for one test case" ideal of most frameworks.
}

@Test
public void thisShouldBeThreeTests() throws Exception{
   testObj.doSomething(7);
   verify(someServiceMock).doAThing(7);
   verify(anotherService).doAThing(700);

   testObj.doSomethingElse(9);
   verify(someServiceMock).doAThing(9);
   verify(anotherService).doAThing(900);

   testObj.doAThirdThing(12);
   verify(someServiceMock).doAThing(12);
   verify(anotherService).doAThing(1200);

   // BAD: Even though these are related, this could easily be three
   // unrelated tests for better naming and reporting, and to help you
   // identify why one case might be failing versus three. Break this up.
}

```

So yes, don't be afraid to have more than one `verify` in the same test, but do be careful not to let your `verify` statements stray to be unrelated, and be especially careful if you're resetting your test setup with Mockito's `reset` method.