Skip to content

Commit

Permalink
New tip. Django testing
Browse files Browse the repository at this point in the history
  • Loading branch information
renegarcia committed Jun 18, 2023
1 parent 5950ddd commit 34ae5ad
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions notes/code.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
id: 631hw9oh0k8jhc0wlm0joyz
title: Code
title: Coding tips
desc: ''
updated: 1686590744125
updated: 1687107935898
created: 1685471254996
---

Expand All @@ -13,9 +13,32 @@ created: 1685471254996
git remote set-url origin <new-url>

```

[Source](https://chat.openai.com/share/5bbfc058-d6be-4ec8-b03f-be8df3619c37)



# Django tests not running

__Solution.__ Make sure you are writing your tests wrapped in classes that inherit from `TestCase`. Example:

```python
from django.test import TestCase


class FooTest(TestCase):
def setUp(self):
pass

def tearDown(self):
pass

def test_this_will(self):
print 'Win'
```

[Read more](https://stackoverflow.com/questions/2037364/django-test-runner-not-finding-tests)


# Python

[[code.python]]

0 comments on commit 34ae5ad

Please sign in to comment.