Django tests slows after MacOS Sierra
<p>I'm working on a Django project using Python 3 and Django 1.10 on Mac.</p>

<p>Before update I was running 40 tests in 0.441s.</p>

<p>Now after MacOS Sierra: Ran 40 tests in 5.487s</p>

<p>I did some investigations and found this line to be the problem:</p>

<pre><code>response = self.client.post(r('subscriptions:new'), data)
</code></pre>

<p>If I pass a empty dict instead of data, the tests run faster. Anyone have a clue why this is happening?</p>

<p>I found that to resolve local DNS was taking forever to resolve.</p>

<p>If anyone has the same problem run this commands:</p>

<p>sudo scutil --get LocalHostName
sudo scutil --get HostName</p>

<p>If the result is not the same, use this commands to put them equal:</p>

<p>sudo scutil --set LocalHostName My-MacBook
sudo scutil --set HostName My-MacBook</p>

<p>Problem solved to me.</p>

python django macos-sierra