Skip to content

Commit

Permalink
Add Generate city to liara.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
muhuchah committed Jun 8, 2024
1 parent 418b2ea commit 204a71d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/liara.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
source venv/bin/activate
pip install -r requirements.txt
- name: Generate City
working-directory: Karoo_BackEnd/Karoo_BackEnd
run: |
source venv/bin/activate
python manage.py generate_city
- name: Run Django migrations
working-directory: Karoo_BackEnd/Karoo_BackEnd
run: |
Expand Down
6 changes: 2 additions & 4 deletions Karoo_BackEnd/Karoo_BackEnd/support/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from account_module.models import User, Province, City
from category_module.models import MainCategory, SubCategory
from model_bakery import baker
from django.core.management import call_command

class SpamReportModelTest(TestCase):
def setUp(self):
Expand All @@ -19,9 +18,8 @@ def setUp(self):
self.main_category = baker.make(MainCategory)
self.sub_category = baker.make(SubCategory, MainCategory=self.main_category)

call_command('generate_city')
self.province = Province.objects.get(id=1)
self.city = City.objects.get(id=1)
self.province = baker.make(Province)
self.city = baker.make(City, province=self.province)

self.job = job.objects.create(
user = self.user,
Expand Down

0 comments on commit 204a71d

Please sign in to comment.