uk_bin_collection 0.85.3__py3-none-any.whl → 0.85.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -409,17 +409,17 @@ def test_string_with_whitespace_and_numbers():
409
409
  (
410
410
  "2024-09-02",
411
411
  "Tuesday",
412
- "03/09/2024",
412
+ "09/03/2024",
413
413
  ), # Today is Monday, next Tuesday is tomorrow
414
414
  (
415
415
  "2024-09-02",
416
416
  "Sunday",
417
- "08/09/2024",
417
+ "09/08/2024",
418
418
  ), # Today is Monday, next Sunday is in 6 days
419
419
  (
420
420
  "2024-09-03",
421
421
  "Wednesday",
422
- "04/09/2024",
422
+ "09/04/2024",
423
423
  ), # Today is Tuesday, next Wednesday is tomorrow
424
424
  (
425
425
  "2024-09-03",
@@ -430,8 +430,8 @@ def test_string_with_whitespace_and_numbers():
430
430
  )
431
431
  def test_get_next_day_of_week(today_str, day_name, expected):
432
432
  mock_today = datetime.strptime(today_str, "%Y-%m-%d")
433
- with patch("datetime.datetime") as mock_datetime:
433
+ with patch('uk_bin_collection.common.datetime') as mock_datetime: # replace 'your_module' with the actual module name
434
434
  mock_datetime.now.return_value = mock_today
435
- mock_datetime.strptime = datetime.strptime # to handle strptime within patch
436
- result = get_next_day_of_week(day_name)
437
- assert result == expected
435
+ mock_datetime.side_effect = lambda *args, **kw: datetime(*args, **kw)
436
+ result = get_next_day_of_week(day_name, date_format="%m/%d/%Y")
437
+ assert result == expected
@@ -252,7 +252,7 @@ def save_data(file_path, data):
252
252
  json.dump(data, file, sort_keys=True, indent=4)
253
253
 
254
254
 
255
- def get_next_day_of_week(day_name):
255
+ def get_next_day_of_week(day_name, date_format="%d/%m/%Y"):
256
256
  days_of_week = [
257
257
  "Monday",
258
258
  "Tuesday",
@@ -5,7 +5,7 @@ import requests
5
5
  import logging
6
6
  import re
7
7
  from datetime import datetime
8
- from uk_bin_collection.common import *
8
+ from uk_bin_collection.uk_bin_collection.common import *
9
9
  from dateutil.parser import parse
10
10
 
11
11
  from uk_bin_collection.uk_bin_collection.common import check_uprn, check_postcode
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uk_bin_collection
3
- Version: 0.85.3
3
+ Version: 0.85.5
4
4
  Summary: Python Lib to collect UK Bin Data
5
5
  Author: Robert Bradley
6
6
  Author-email: robbrad182@gmail.com
@@ -7,10 +7,10 @@ uk_bin_collection/tests/output.schema,sha256=ZwKQBwYyTDEM4G2hJwfLUVM-5v1vKRvRK9W
7
7
  uk_bin_collection/tests/step_defs/step_helpers/file_handler.py,sha256=Ygzi4V0S1MIHqbdstUlIqtRIwnynvhu4UtpweJ6-5N8,1474
8
8
  uk_bin_collection/tests/step_defs/test_validate_council.py,sha256=LrOSt_loA1Mw3vTqaO2LpaDMu7rYJy6k5Kr-EOBln7s,3424
9
9
  uk_bin_collection/tests/test_collect_data.py,sha256=cZjz4XUe5zaWCDJK96p2p7EC9GWrmT15ooFFx6mlP1Q,4776
10
- uk_bin_collection/tests/test_common_functions.py,sha256=KyXSJvUe_28b2krqtxu9TLDiaViyBXUdMkGU6HnQUos,14000
10
+ uk_bin_collection/tests/test_common_functions.py,sha256=WRm7AYI9qaDqW0dNROTFh-KZRdNFhhYHvjrFZUN4IPs,14084
11
11
  uk_bin_collection/tests/test_conftest.py,sha256=GWqP6-fCv5A2VUYiyXqUO-Dm0hlUOwbFgfi6CkdGqvQ,1061
12
12
  uk_bin_collection/uk_bin_collection/collect_data.py,sha256=dB7wWXsJX4fm5bIf84lexkvHIcO54CZ3JPxqmS-60YY,4654
13
- uk_bin_collection/uk_bin_collection/common.py,sha256=eNsYImAR7YC-rSifWWGVGkqwk5uzQOcyhDr1H4sXqOw,10082
13
+ uk_bin_collection/uk_bin_collection/common.py,sha256=oZQW8CYRGfbhNSyq7t7jEhrFl1tjb4H157xSx8QHWSY,10106
14
14
  uk_bin_collection/uk_bin_collection/councils/AdurAndWorthingCouncils.py,sha256=ppbrmm-MzB1wOulK--CU_0j4P-djNf3ozMhHnmQFqLo,1511
15
15
  uk_bin_collection/uk_bin_collection/councils/ArunCouncil.py,sha256=yfhthv9nuogP19VOZ3TYQrq51qqjiCZcSel4sXhiKjs,4012
16
16
  uk_bin_collection/uk_bin_collection/councils/AylesburyValeCouncil.py,sha256=LouqjspEMt1TkOGqWHs2zkxwOETIy3n7p64uKIlAgUg,2401
@@ -23,7 +23,7 @@ uk_bin_collection/uk_bin_collection/councils/BedfordBoroughCouncil.py,sha256=CvG
23
23
  uk_bin_collection/uk_bin_collection/councils/BedfordshireCouncil.py,sha256=U1HOr9YLMAlFoZysfw5n04E0bVuCliO5Yj1FMiiwcHA,2549
24
24
  uk_bin_collection/uk_bin_collection/councils/BelfastCityCouncil.py,sha256=mspYVHO8fgoVIwogT6V2Go1tbf3PDbEmr8kZMJug5Gs,4235
25
25
  uk_bin_collection/uk_bin_collection/councils/BexleyCouncil.py,sha256=9MrbpfR17R6DYjDrItQL3CPF7ie1SJkaoNbwQumPgIQ,5399
26
- uk_bin_collection/uk_bin_collection/councils/BirminghamCityCouncil.py,sha256=yrO9dnSMdqVTcrzqXXfexFxSuESW01VPxXNAl0_lNOU,4669
26
+ uk_bin_collection/uk_bin_collection/councils/BirminghamCityCouncil.py,sha256=now2xgpfshYM33UWC18j6xa6BuBydO5Sl7OrDQOo6b0,4687
27
27
  uk_bin_collection/uk_bin_collection/councils/BlackburnCouncil.py,sha256=jHbCK8sL09vdmdP7Xnh8lIrU5AHTnJLEZfOLephPvWg,4090
28
28
  uk_bin_collection/uk_bin_collection/councils/BoltonCouncil.py,sha256=r7wjrRPT2EinRMnYjGxmsCD6aMFhEOyRNd8_3R9PdQU,4117
29
29
  uk_bin_collection/uk_bin_collection/councils/BracknellForestCouncil.py,sha256=Llo1rULaAZ8rChVYZqXFFLo7CN6vbT0ULUJD6ActouY,9015
@@ -185,8 +185,8 @@ uk_bin_collection/uk_bin_collection/councils/YorkCouncil.py,sha256=I2kBYMlsD4bId
185
185
  uk_bin_collection/uk_bin_collection/councils/council_class_template/councilclasstemplate.py,sha256=4s9ODGPAwPqwXc8SrTX5Wlfmizs3_58iXUtHc4Ir86o,1162
186
186
  uk_bin_collection/uk_bin_collection/create_new_council.py,sha256=m-IhmWmeWQlFsTZC4OxuFvtw5ZtB8EAJHxJTH4O59lQ,1536
187
187
  uk_bin_collection/uk_bin_collection/get_bin_data.py,sha256=YvmHfZqanwrJ8ToGch34x-L-7yPe31nB_x77_Mgl_vo,4545
188
- uk_bin_collection-0.85.3.dist-info/LICENSE,sha256=vABBUOzcrgfaTKpzeo-si9YVEun6juDkndqA8RKdKGs,1071
189
- uk_bin_collection-0.85.3.dist-info/METADATA,sha256=jXEWVEzVmagM6EHcSpRQtijul0kTxHnUF5OXZGJ4iBU,16231
190
- uk_bin_collection-0.85.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
191
- uk_bin_collection-0.85.3.dist-info/entry_points.txt,sha256=36WCSGMWSc916S3Hi1ZkazzDKHaJ6CD-4fCEFm5MIao,90
192
- uk_bin_collection-0.85.3.dist-info/RECORD,,
188
+ uk_bin_collection-0.85.5.dist-info/LICENSE,sha256=vABBUOzcrgfaTKpzeo-si9YVEun6juDkndqA8RKdKGs,1071
189
+ uk_bin_collection-0.85.5.dist-info/METADATA,sha256=G7stCdHgn58f50RCOAtx0YIs9vFto9YHNZR1nLQXUQY,16231
190
+ uk_bin_collection-0.85.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
191
+ uk_bin_collection-0.85.5.dist-info/entry_points.txt,sha256=36WCSGMWSc916S3Hi1ZkazzDKHaJ6CD-4fCEFm5MIao,90
192
+ uk_bin_collection-0.85.5.dist-info/RECORD,,