Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into TT-418-CRUD-CUSTOME…
…R-V2
  • Loading branch information
mandres2015 committed Nov 26, 2021
commit 12c16633dfbadbd88a4a3c4ffd9991883a1791bc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Time Tacker V1 CI - ON PR
name: Time Tacker V1 CI

on:
pull_request:
branches: [master]

jobs:
time-tracker-ci-v1-on-pr:
time-tracker-ci:
runs-on: ubuntu-latest

strategy:
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/time-tracker-v1-on-push-workflow.yml

This file was deleted.

12 changes: 11 additions & 1 deletion V2/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ functions:
route: time-entries/{id}
authLevel: anonymous

update_time_entry:
handler: time_tracker/time_entries/interface.update_time_entry
events:
- http: true
x-azure-settings:
methods:
- PUT
route: time-entries/{id}
authLevel: anonymous

#endregion end Time-Entries

#region start Customer
Expand Down Expand Up @@ -166,4 +176,4 @@ functions:

#endregion end Customer

#endregion end Functions
#endregion end Functions
1 change: 1 addition & 0 deletions V2/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from fixtures import _activity_factory, _test_db, _insert_activity
from fixtures import _time_entry_factory
from fixtures import _customer_factory, _insert_customer
from fixtures import _project_factory
33 changes: 30 additions & 3 deletions V2/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import time_tracker.time_entries._domain as time_entries_domain
import time_tracker.customers._domain as customers_domain
import time_tracker.activities._infrastructure as activities_infrastructure
import time_tracker.customers._infrastructure as customer_infrastructure
import time_tracker.customers._infrastructure as customers_infrastructure
import time_tracker.projects._domain as projects_domain
from time_tracker._infrastructure import DB


Expand Down Expand Up @@ -97,10 +98,36 @@ def _make_customer(
return _make_customer


@pytest.fixture(name='project_factory')
def _project_factory() -> projects_domain.Project:
def _make_project(
id=Faker().pyint(),
name=Faker().name(),
description=Faker().sentence(),
project_type_id=Faker().pyint(),
customer_id=Faker().pyint(),
status=Faker().pyint(),
deleted=False,
technologies=str(Faker().pylist())
):
project = projects_domain.Project(
id=id,
name=name,
description=description,
project_type_id=project_type_id,
customer_id=customer_id,
status=status,
deleted=deleted,
technologies=technologies
)
return project
return _make_project


@pytest.fixture(name='insert_customer')
def _insert_customer() -> dict:
def _insert_customer() -> customers_domain.Customer:
def _new_customer(customer: customers_domain.Customer, database: DB):
dao = customer_infrastructure.CustomersSQLDao(database)
dao = customers_infrastructure.CustomersSQLDao(database)
new_customer = dao.create(customer)
return new_customer
return _new_customer
You are viewing a condensed version of this merge commit. You can view the full changes here.