hefeholuwah / AirBnB_clone_v3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AirBnB Clone Phase #3

Description

Project attempts to clone the the AirBnB application and website, including the database, storage, RESTful API, Web Framework, and Front End.

Environment

  • OS: Ubuntu 14.04 LTS
  • language: Python 3.4.3
  • style: PEP 8 (v. 1.7.0)

Testing

unittest

This project uses python library, unittest to run tests on all python files. All unittests are in the ./tests directory with the command:

  • python3 -m unittest discover -v ./tests/

The bash script init_test.sh executes all these tests:

  • checks pep8 style

  • runs all unittests

  • runs all w3c_validator tests

  • cleans up all __pycache__ directories and the storage file, file.json

Usage:

$ ./dev/init_test.sh

CLI Interactive Tests

This project uses python library, cmd to run tests in an interactive command line interface. To begin tests with the CLI, run this script:

$ ./console.py
  • For a detailed description of all tests, run these commands inside the custom CLI:
$ ./console.py
(hbnb) help help
List available commands with "help" or detailed help with "help cmd".
(hbnb) help

Documented commands (type help <topic>):
========================================
Amenity    City  Place   State  airbnb  create   help  show
BaseModel  EOF   Review  User   all     destroy  quit  update

(hbnb) help User
class method with .function() syntax
        Usage: User.<command>(<id>)
(hbnb) help create
create: create [ARG]
        ARG = Class Name
        SYNOPSIS: Creates a new instance of the Class from given input ARG
  • Tests in the CLI may also be executed with this syntax:

    • destroy: <class name>.destroy(<id>)

    • update: <class name>.update(<id>, <attribute name>, <attribute value>)

    • update with dictionary: <class name>.update(<id>, <dictionary representation>)

Continuous Integration

Uses Travis-CI to run all tests on all commits to the github repo

Authors

  • Adefioye Ifeoluwah, @hefeholuwah

License

Public Domain, no copyright protection

About


Languages

Language:HTML 91.4%Language:Less 3.5%Language:Python 2.4%Language:SCSS 1.7%Language:CSS 0.7%Language:JavaScript 0.1%Language:Ruby 0.1%Language:Makefile 0.1%Language:Shell 0.0%