# Tests not working in Travis CI

**URL:** <https://travis-ci.community/t/tests-not-working-in-travis-ci/10174>\
**Category:** Deployment\
**Tags:** python\
**Created:** [October 16, 2020, 5:24am UTC](https://travis-ci.community/t/tests-not-working-in-travis-ci/10174 "2020-10-16T05:24:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolarUltima](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/solarultima/32/4019_2.png) [@SolarUltima](https://travis-ci.community/u/SolarUltima)\
**Post date:** [October 16, 2020, 5:24am UTC](https://travis-ci.community/t/tests-not-working-in-travis-ci/10174/1 "2020-10-16T05:24:53Z")

</div>

I am trying to deploy Travis CI in my Django/ Vue project. I added this `.travis.yml` file to my root folder:

```auto
language: python
python:
  - '3.7.3'
sudo: required
before_install:
  - chmod +x ./pizza/manage.py
before_script:
  - pip install -r requirements.txt
env: DJANGO_SETTINGS_MODULE="pizzago.settings"
services:
  - postgresql
script:
  - ./pizza/manage.py test --keepdb

```

But as I run the build I get this output:

```auto
   pip install -r requirements.txt
   ./pizza/manage.py test --keepdb
   System check identified no issues (0 silenced).
   Ran 0 tests in 0.000s
   OK
   The command "./pizza/manage.py test --keepdb" exited with 0.
   Done. Your build exited with 0.

```

Running my tests locally with `'python3 manage.py test --keepdb'` works perfectly. My `manage.py` is not in my root folder. Looks like my tests are not found.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [October 16, 2020, 5:29am UTC](https://travis-ci.community/t/tests-not-working-in-travis-ci/10174/2 "2020-10-16T05:29:12Z")

</div>

Hey @SolarUltima,

Your `manage.py` is **not** in your root directory but rather it’s `/pizza/` directory. Travis should run the script inside this directory.

Change your `.travis.yml` to read this way (can lint this to make sure this works):

```auto
language: python
python:
  - '3.7.3'
sudo: required
before_install:
  - chmod +x ./pizza/manage.py
before_script:
  - pip install -r requirements.txt
  - cd ./pizza/
env: DJANGO_SETTINGS_MODULE="pizzago.settings"
services:
  - postgresql
script:
  - python manage.py test --keepdb

```

This will solve your issue hopefully, if it doesn’t please post back.

---

<div class="post-metadata">

**Author:** ![SolarUltima](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/solarultima/32/4019_2.png) [@SolarUltima](https://travis-ci.community/u/SolarUltima)\
**Post date:** [October 19, 2020, 7:53am UTC](https://travis-ci.community/t/tests-not-working-in-travis-ci/10174/3 "2020-10-19T07:53:06Z")

</div>

hey @Montana those settings appear to work on the yaml file, on the test django app

-SU  
Norway

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [October 19, 2020, 8:06am UTC](https://travis-ci.community/t/tests-not-working-in-travis-ci/10174/4 "2020-10-19T08:06:04Z")

</div>

Hey @SolarUltima,

No problem. I’ll link you to a gist, for a further example. Glad I could help.
